InterviewLegend

Trees & Graphs

Alex Chen34 min readUpdated

Graphs show up at Plaid the moment you stop looking at one transaction and start looking at how things connect. Setup steps for a new bank integration depend on each other. Account records scattered across a dozen institutions turn out to describe the same person. Money has to route from one institution to another through shared clearing networks. Each of those is a graph question underneath a fintech prompt, and the tools are the ordinary ones: breadth-first and depth-first traversal, a shortest-path sweep, a topological sort, and union-find for grouping. This lesson drills the three shapes that recur most, framed the way the round frames them.

The through-line is dependency and identity. A dependency graph asks "what order can these steps run in, and did someone wire a cycle into them," which is topological sort. An identity graph asks "how many distinct customers are hiding in these fuzzy-matched account records," which is connected components. And a routing graph asks "what is the fewest number of hops to move value from here to there," which is a plain breadth-first search when the edges carry no weight. Get comfortable recognizing which of the three you are holding, because the prompt rarely says the word "graph" at all.

The Plaid angle
Pin down whether the graph can contain a cycle before you commit to an algorithm, because on a dependency prompt that is the load-bearing constraint. Plaid interviewers reward the candidate who gathers constraints first. For a graph of integration steps, the deciding question is whether the input is guaranteed acyclic or a misconfigured dependency could loop back on itself. If a cycle is possible, your topological sort has to double as cycle detection, and Kahn's algorithm gives you that for free: a graph with a cycle never drains its queue. State up front that you will return an empty ordering and flag the offending steps when the count of processed nodes falls short. On a setup graph, an unsatisfiable dependency is not an edge case, it is the reason the question is worth asking.
What's inside
  • 3 problems, worked step by step
  • about 34 min

Premium lessonPlaid interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · Cancel anytime

Had your Plaid interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Plaid interview guide

Know what Plaid asks before you walk in.

16 coding · 5 system design · 18 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.