← Stripe Interview Insights

Stripe·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Stripe coding round with a weighted merchant-matching problem. Solid question, took me a bit to fully internalize the scoring logic but it was a good problem overall.

Questions Asked (1)

Q1

You're given a target merchant ID, a list of merchants, a set of per-field weights (for fields like ID, name, email, and phone), and a score threshold. Two merchants are considered linked if the sum of scores from their matching fields exceeds the threshold. Return all merchants linked to the target.

Algorithms & Data StructuresSystem Design
Author's notes

This is basically a weighted variant of a deduplication or entity-matching problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the problem by defining how field scores are computed (e.g., exact match, similarity) and whether the graph is directed or undirected. Then model merchants as nodes and compute pairwise link scores, building an adjacency list for edges above the threshold. Finally, perform a graph traversal (BFS/DFS) from the target merchant to find all connected merchants.

Pro tip: Discuss scalability early: naive pairwise comparison is O(N^2), so propose blocking or indexing (e.g., by exact match on high-weight fields) to reduce candidate pairs. Also, mention that link scores might be asymmetric if field weights differ, so clarify directionality.

1. Clarify requirements and assumptions

Ask about score computation (exact match vs. fuzzy), directionality of links, and whether the threshold is inclusive. Confirm input/output formats and edge cases (e.g., no links, cycles).

2. Design the scoring and graph construction

Define a function to compute the link score between two merchants based on matching fields and weights. Build an adjacency list by comparing all merchant pairs (or using an optimized approach) and adding edges where score >= threshold.

3. Traverse the graph to find linked merchants

Use BFS or DFS starting from the target merchant to explore all reachable nodes. Keep track of visited merchants to avoid cycles and collect the result set.

4. Analyze complexity and optimize

Discuss time and space complexity: O(N^2) for pairwise comparison and O(N+E) for traversal. Propose optimizations like indexing, blocking, or early termination for large datasets.

5. Handle edge cases and test

Consider cases like no linked merchants, target not in list, duplicate merchants, and threshold variations. Walk through a small example to validate the approach.

Key Points to Mention

  • Graph modeling: merchants as nodes, links as edges with weights based on field matches.
  • Score computation: sum of weighted field matches, threshold comparison.
  • Traversal algorithm: BFS/DFS to find connected component containing target.
  • Complexity analysis: O(N^2) pairwise comparison, O(N+E) traversal.
  • Scalability optimizations: blocking, indexing, or approximate matching for large N.
  • Edge cases: cycles, disconnected components, threshold inclusivity, and directionality.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.