Master LeetCode 39 — Combination Sum by understanding the backtracking decision tree, why unlimited reuse is handled by staying at the same index, and how sorting enables early pruning. Includes Python and JavaScript solutions with line-by-line comments, a full visual dry run, common mistakes, and follow-up questions on LC 40, LC 216, and LC 377.
LC 46 — Permutations is the canonical backtracking problem every interviewer uses to test recursive thinking. Learn two clean approaches — the visited-array method and the in-place swap method — with a full decision-tree dry run for [1,2,3], the three most common interview mistakes, and real follow-up questions on LC 47 and LC 60.
LC 78 is the gateway to every combination and permutation problem in FAANG interviews. Master all three approaches — backtracking, bitmask enumeration, and iterative cascading — with deep visual dry runs, real interview follow-ups, and line-by-line Python and JavaScript solutions.
LeetCode 40 is a FAANG backtracking favorite that tests duplicate handling. Sort the candidates and skip same-level repeats to enumerate unique sum combinations.
LeetCode 90 — asked at Amazon, Apple, and Google. Generate all unique subsets from an array with duplicates. Sort first, then in backtracking skip duplicate elements at the same recursion depth. O(2^n) time — the cleanest duplicate-handling pattern in all backtracking problems.
LeetCode 78 Subsets: enumerate the power set with bitmask iteration. Master the elegant 2^n bit-loop FAANG interviewers prefer over recursion for its clarity and speed.
Determine whether a word can be spelled by traversing adjacent cells without reusing any cell. The canonical DFS-with-backtracking template every grid-search interview problem builds on.
LC 77 Combinations, LC 39 Combination Sum, and LC 40 Combination Sum II form a trilogy that every FAANG interviewer loves. Master the start-index pattern to enumerate selections without duplicates and the i+1 vs i reuse trick.
LC 51 N-Queens is the gold standard for testing backtracking, constraint propagation, and bit-mask elegance. Master row-by-row placement, three diagonal-tracking sets, and the bitmask trick that runs N=15 in milliseconds.
LC 37 Sudoku Solver is the most-asked constraint-satisfaction problem in tech interviews. Master row, column, and box bitsets, MRV heuristic ordering, and the cell-by-cell decision tree that solves any 9x9 grid in milliseconds.
LC 22 Generate Parentheses is the backtracking warm-up every FAANG interviewer reaches for. Master the open and close counter invariant, the Catalan number trail, and why a string-builder beats array joins for clean recursion.
LC 79 Word Search and LC 212 Word Search II ship in nearly every FAANG onsite. Master DFS with in-place visited marking, four-directional exploration, and the trie trick that turns multi-word search into a single traversal.
LC 17 Letter Combinations of a Phone Number is the cleanest cartesian-product backtracking template ever written. Master the digit-to-letter mapping, the per-position branching, and why the iterative BFS variant is asked at Amazon.
Master LeetCode 131 Palindrome Partitioning using backtracking with a precomputed palindrome DP table. Learn the decision tree, pruning, and FAANG interview tips.
Master Partition Equal Subset Sum (LC 416) and Partition to K Equal Sum Subsets (LC 698) with bucket backtracking, sorting tricks, and FAANG-grade pruning.
Solve the Knight's Tour with backtracking and Warnsdorff's heuristic. Visit every square exactly once on an n by n board with O(8^(n^2)) brute force tamed by smart move ordering.
LeetCode 526 Beautiful Arrangement with backtracking and bitmask DP. Learn how to generate divisibility-constrained permutations with FAANG interview tips.
M-coloring, bipartite check, and Hamiltonian path/cycle: backtracking on graphs with constraint propagation, ordering heuristics, and FAANG interview prep.
Word Search II (LC 212) is the canonical FAANG hard combining trie data structures with grid backtracking. Build a trie from the dictionary, DFS each cell, and prune aggressively to convert an exponential brute force into a fast practical algorithm.
LeetCode 212 — find every dictionary word hidden in a board. The optimal solution builds a trie over the words and DFS-traverses the grid once, pruning entire branches the moment the path leaves the trie. A textbook FAANG hard problem.