Number of Islands: A Step-by-Step Interview Walkthrough
Number of Islands is a common interview problem because it tests a specific cognitive move: can you recognize that a problem presented in one form is actually a different problem in disguise? The 2D grid framing is intuitive — humans naturally think of grids as visual things — but the underlying problem is counting connected components in a graph. The signal here is whether you can map between representations — see past the surface presentation to the underlying structure.
3 days ago14 min read
Path Sum in a Binary Tree: A Step-by-Step Interview Walkthrough
Path Sum in a Binary Tree is a deceptively simple-looking problem that interviewers use as a reading comprehension test as much as an algorithm test. The problem statement contains specific constraints that, if misread, lead candidates to solve a harder problem than the one asked. Candidates who skim the requirements often write algorithms that handle "any path" or "any node to any node," which is significantly more complex and earns no extra credit.
4 days ago11 min read
Binary Tree Maximum Path Sum: A Step-by-Step Interview Walkthrough
Binary Tree Maximum Path Sum is one of the genuinely hard tree problems in the standard interview rotation. Most tree problems are about traversing a structure or computing a single value per node. This one asks something more subtle: find the best path anywhere in the tree, where "anywhere" includes paths that don't start at the root, don't end at a leaf, and bend through any node.
5 days ago12 min read
Serialize and Deserialize Binary Tree: A Step-by-Step Interview Walkthrough
Serialize and Deserialize Binary Tree is one of the rare interview problems that's actually a design problem. There's no fixed answer — you get to choose your own encoding, and the interviewer is watching to see whether your choice is principled or arbitrary. The signal here is whether you can think about data as having structure that needs explicit encoding, not just values that get written down.
6 days ago11 min read
Lowest Common Ancestor of a BST: A Step-by-Step Interview Walkthrough
Lowest Common Ancestor of a BST is a problem that interviewers use to test a specific kind of reading comprehension: did the candidate notice they were handed a BST, or did they treat it as a generic binary tree? The signal is whether you treat the data structure's invariants as algorithmic information rather than incidental detail.
7 days ago9 min read
