top of page
Search
Largest Rectangle in Histogram: A Step-by-Step Interview Walkthrough
Largest Rectangle in Histogram earns its status as a hard problem because while the brute force solution is obvious, the optimization is not, and the leap between them requires a genuinely clever data structure: the monotonic stack.
6 days ago16 min read
Median of Two Sorted Arrays: A Step-by-Step Interview Walkthrough
Median of Two Sorted Arrays is one of the most famous Hard problems in the interview canon, and its reputation is earned by a single, brutal constraint: the required time complexity is O(log(m + n)). Without that constraint, the problem is trivial — merge the two arrays and grab the middle. With it, you're forced into a binary search, except there's no obvious single sorted array to binary-search over.
Jun 2216 min read
Minimum Window Substring: A Step-by-Step Interview Walkthrough
Minimum Window Substring is the problem that separates people who've used sliding windows from people who understand them. Most candidates have seen a window expand and contract on simpler problems, but this one forces two harder questions at once: how do you efficiently check whether the current window contains everything you need (including duplicates), and how do you know when to expand versus when to shrink?
Jun 2015 min read
Critical Connections in a Network: A Step-by-Step Interview Walkthrough
Critical Connections in a Network is a genuinely hard graph problem, the kind where knowing the right algorithm matters more than coding speed. It asks you to find every bridge in a graph — an edge whose removal would split the network into disconnected pieces. It's a problem that rewards understanding the theory, not just pattern-matching.
Jun 914 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.
May 2412 min read
KSum
The KSum problem generalizes 2Sum, 3Sum, and 4Sum into a flexible recursive solution that can find all unique combinations of k numbers in an array that sum to a target. It’s a fantastic problem for practicing recursion, backtracking, and thinking about how to build modular solutions that scale with complexity. Once you’ve nailed KSum, you can solve any of the others as special cases.
May 28, 20255 min read
bottom of page