Stop Guessing Between DSA Lookalikes
The difference between an offer and a reject is rarely syntax. It is knowing why negative numbers break sliding windows, why token change needs DP, and when greedy end-sorting beats start-sorting.
Backtracking vs Dynamic Programming
Combinatorial Path Reporting vs Subproblem State Collapse
"Does the problem ask you to return or print ALL valid combinations and paths, or does it ask for a COUNT, MAXIMUM, MINIMUM, or BOOLEAN EXISTENCE?"
When you must explore every winding path to print combinations, versus when a few numbers summarize your state for dynamic programming.
Breadth-First Search vs Depth-First Search
Shortest Steps in Unweighted Graphs vs Branch Exhaustion and Recursion Hazards
"Are you finding the shortest path in an unweighted structure, or are you validating complete subtree properties and connectivity?"
Choosing between queue-based layer expansion and recursive depth traversal, including recursion depth limits and Kahn's topological sort.
Greedy vs Dynamic Programming
The Cashier Coin Trap and Proving the Greedy Choice Property
"Does making the locally optimal choice right now guarantee you will never regret it later, or can an early choice paint you into a suboptimal corner?"
How to tell when making the best local choice right now is globally optimal, versus when choices interact and require dynamic programming.
Interval Greedy: Sort by Start vs Sort by End
Timeline Merging vs Maximum Resource Scheduling
"Are you merging overlapping spans into unified blocks, or are you packing the maximum number of mutually compatible intervals into one resource?"
How sorting intervals by start time solves union and insertion problems, while sorting by end time solves maximum scheduling and minimum removal problems.
Sliding Window vs Prefix Sum + Hash
The Non-Negative Monotonicity Rule and the Negative Numbers Trap
"Can the array numbers be negative, or does expanding the window move your condition in only one predictable direction?"
Why negative numbers break sliding windows completely, and how prefix sum hash maps recover O(N) lookup for arbitrary integer arrays.
Two Pointers vs Sliding Window
Opposite Ends Narrowing vs Monotonic Contiguous Windows
"Does expanding or shrinking the boundary change the validity condition monotonically, or are you pruning search space from opposite ends of a sorted array?"
How to decide between inward-converging pointers on a sorted array and an expanding-contracting window on contiguous data.
Ready to Master Every Pattern?
Every decision guide links directly to full worked solutions in our 107-lesson DSA Interview Course, complete with brute force evolutions, visual dry runs, and 4-language code flaps.