Graphs & Trees
A Cash App payment is an edge in a graph. One account sends money to another. That single transfer becomes a line between two nodes, and across millions of users the structure gets enormous. Fraud teams score how money moves between accounts to catch scams, and the shape underneath that work is a graph question: who connects to whom, and how far the connection reaches. The coding round almost never uses the word graph. It hands you a stream of transfers, a list of seller locations, or a grid a delivery has to cross, and recognizing the traversal is the job.
This lesson bundles the traversal patterns that round out Block's medium bar. BFS and DFS over a graph, the same search over a grid as a step-by-step simulation, tree aggregation, and the lighter dynamic programming that surfaces onsite. Where the structure is textbook, the foundational version lives in the free course. This page stays on the Cash App and Square problems Block reaches for and the escalating follow-ups that carry the grade.
BlockPremium lesson · Coding round
The 2 Block problems are below.
- A Premium questionCoding · Medium
- A Premium questionCoding · Easy
Each with hints, the follow-up and a tested solution.
Get the Block questions$49 a year · all 100 companies · cancel anytime
From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.
Block interview guideKnow what Block asks before you walk in.
13 coding · 5 system design · 14 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.