Hot100: Permutations (used[] Backtracking ACERS Guide)

Subtitle / Summary If Subsets teaches the skeleton of combination-style backtracking, Permutations teaches the core of state-based backtracking: at each position, choose one unused element, continue until the path length reaches n, and only then collect the answer. Reading time: 10-12 min Tags: Hot100, backtracking, permutations, DFS SEO keywords: Permutations, backtracking, used array, DFS, LeetCode 46 Meta description: Learn the stable permutation backtracking template for LeetCode 46, with state recovery, engineering analogies, and runnable multi-language solutions. Target Readers Hot100 learners who have already finished 78. Subsets and want the next backtracking template Developers who understand recursion but still make mistakes when restoring state Engineers who need to enumerate execution orders, test sequences, or ordering-sensitive plans Background / Motivation The key difference between combinations and permutations is simple: ...

April 3, 2026 · 8 min · map[name:Jeanphilo]

Hot100: Subsets (Backtracking / startIndex ACERS Guide)

Subtitle / Summary Subsets is the cleanest entry point into Hot100 backtracking. The main thing to stabilize is not “enumerate everything”, but the three invariants behind the template: path, startIndex, and “every node is already a valid answer”. Reading time: 10-12 min Tags: Hot100, backtracking, subsets, DFS SEO keywords: Subsets, backtracking, startIndex, power set, LeetCode 78 Meta description: Learn the stable backtracking template for LeetCode 78, with engineering analogies, pitfalls, and runnable multi-language solutions. Target Readers Hot100 learners starting the backtracking block today Developers who can write DFS but still mix up combinations and permutations Engineers who need to enumerate feature sets, candidate policies, or configuration bundles Background / Motivation Many “real” problems reduce to a subset model: ...

April 2, 2026 · 7 min · map[name:Jeanphilo]

Hot100: Binary Tree Level Order Traversal (BFS / DFS ACERS Guide)

Subtitle / Summary Level order traversal is the entry point of the binary-tree BFS template. The real key is not merely “use a queue”, but “separate one level from the next correctly”. This ACERS guide explains the level-size pattern, the DFS depth-bucket alternative, and engineering situations where grouped-by-depth traversal is useful. Reading time: 10-12 min Tags: Hot100, binary tree, BFS, DFS, queue, level order traversal SEO keywords: Hot100, Binary Tree Level Order Traversal, BFS, queue, level order traversal, LeetCode 102 Meta description: A systematic guide to LeetCode 102 from level-by-level BFS to DFS depth buckets, with engineering scenarios and runnable multi-language implementations. Target Readers Hot100 learners who want to make the BFS tree template stable Developers who can traverse a tree but still mix up current-level and next-level boundaries Engineers who need to group tree-shaped data by depth for display or execution Background / Motivation LeetCode 102 is one of the most standard tree-BFS starter problems. ...

March 16, 2026 · 12 min · map[name:Jeanphilo]

Hot100: Symmetric Tree (Mirror Recursion / BFS ACERS Guide)

Subtitle / Summary The hard part of Symmetric Tree is not traversal itself, but comparison direction. You are not comparing left to left and right to right. You are comparing mirrored positions. This ACERS guide explains the mirror-recursion contract, the BFS queue-of-pairs variant, and real engineering cases where symmetry checking matters. Reading time: 10-12 min Tags: Hot100, binary tree, DFS, BFS, symmetry SEO keywords: Hot100, Symmetric Tree, mirror recursion, binary tree symmetry, BFS, LeetCode 101 Meta description: A systematic guide to LeetCode 101 from mirror recursion to pairwise BFS symmetry checks, with engineering scenarios and runnable multi-language implementations. Target Readers Hot100 learners moving from Same Tree to mirror comparison Developers who can write ordinary tree recursion but still mix up outside and inside pairs Engineers who need left-right symmetry validation for layouts, topology templates, or mirrored structures Background / Motivation LeetCode 101 is excellent training for directional thinking in tree problems: ...

March 16, 2026 · 11 min · map[name:Jeanphilo]

Hot100: Same Tree (Synchronous Recursion / BFS ACERS Guide)

Subtitle / Summary The real challenge in LeetCode 100 is not “can you traverse a tree”, but “can you compare two trees node by node in lockstep”. This ACERS guide explains the synchronous-recursion contract, the queue-of-pairs BFS variant, and why the pattern matters in real engineering work. Reading time: 9-11 min Tags: Hot100, binary tree, DFS, BFS, tree comparison SEO keywords: Hot100, Same Tree, binary tree comparison, synchronous recursion, BFS, LeetCode 100 Meta description: A systematic guide to LeetCode 100 from synchronous recursion to pairwise BFS comparison, with engineering scenarios and runnable multi-language implementations. Target Readers Hot100 learners who want to build a stable “compare two trees together” template Developers who can write DFS on one tree but get confused once two trees must be checked in parallel Engineers who need structural-equivalence checks for config trees, component trees, or syntax trees Background / Motivation When many people first see LeetCode 100, the instinct is: ...

March 16, 2026 · 11 min · map[name:Jeanphilo]

Hot100: Invert Binary Tree (Recursion / BFS ACERS Guide)

Subtitle / Summary Invert Binary Tree looks tiny, but it is one of the fastest ways to test whether you really understand recursive structure on trees. This guide uses LeetCode 226 to break down the essence of “swap left and right subtrees”, covers both recursion and BFS, and shows how the same idea transfers to engineering scenarios. Reading time: 8-10 min Tags: Hot100, binary tree, recursion, BFS, tree transformation SEO keywords: Hot100, Invert Binary Tree, tree mirror, recursion, BFS, LeetCode 226 Meta description: Learn the recursive and BFS solutions for LeetCode 226, then extend the idea to layout mirroring and structural transformations. Target Readers Hot100 learners who want to verify whether they truly understand “apply recursion to every node in the whole tree” Developers who instinctively start traversing any tree problem, but are unsure when to process the current node Engineers who need tree mirroring, layout inversion, or symmetric structural transforms Background / Motivation The code for LeetCode 226 is usually very short, but the thinking pattern is extremely typical: ...

March 6, 2026 · 10 min · map[name:Jeanphilo]

Hot100: Maximum Depth of Binary Tree (DFS / BFS ACERS Guide)

Subtitle / Summary “Maximum depth” is one of the cleanest starting points for tree recursion. Once you truly understand that the answer for the current tree depends on the answers from its left and right subtrees, a whole family of tree DP and DFS problems becomes easier. This guide uses LeetCode 104 to explain recursive DFS, level-order BFS, and the engineering value of the same pattern. Reading time: 9-11 min Tags: Hot100, binary tree, DFS, BFS, recursion SEO keywords: Hot100, Maximum Depth of Binary Tree, DFS, BFS, LeetCode 104 Meta description: Learn the DFS and BFS solutions for LeetCode 104 from the definition of depth, with engineering mappings and runnable multi-language code. Target Readers Learners who are just starting tree problems and want to truly internalize “tree recursion return values” Developers who can write traversals but get confused once the task becomes “compute height”, “compute path”, or “compute an answer” Engineers who need depth analysis on hierarchical data such as menus, org charts, or nested JSON Background / Motivation LeetCode 104 looks like an easy problem, but it is almost the parent problem of tree recursion: ...

March 6, 2026 · 9 min · map[name:Jeanphilo]

Hot100: Binary Tree Inorder Traversal (Recursion / Stack ACERS Guide)

Subtitle / Summary Binary tree traversal is the starting point of most tree templates, and inorder traversal is one of the cleanest problems for understanding both recursive thinking and explicit stack simulation. This ACERS guide uses LeetCode 94 to explain the left-root-right order, the iterative stack template, and why the pattern matters in real engineering work. Reading time: 10-12 min Tags: Hot100, binary tree, DFS, stack, inorder traversal SEO keywords: Hot100, Binary Tree Inorder Traversal, inorder traversal, explicit stack, LeetCode 94 Meta description: A systematic guide to LeetCode 94 from recursion to explicit stacks, with engineering scenarios and runnable multi-language implementations. Target Readers Hot100 learners who want to lock in a stable tree-traversal template Developers moving from arrays and linked lists to trees, and still mixing up preorder, inorder, and postorder Engineers who want to reuse the left-root-right idea in BSTs, expression trees, or syntax trees Background / Motivation Inorder traversal is not hard by itself, but its training value is high: ...

March 6, 2026 · 11 min · map[name:Jeanphilo]

Hot100: Sort List Linked-List Merge Sort ACERS Guide

Subtitle / Summary LeetCode 148 is not about whether you can sort; it is about choosing the right sorting strategy for linked-list constraints. For singly linked lists, merge sort fits naturally: split by middle, sort recursively, merge linearly. Reading time: 12-16 min Tags: Hot100, linked list, merge sort, divide and conquer SEO keywords: Sort List, linked list merge sort, LeetCode 148, Hot100 Meta description: A practical ACERS guide for LeetCode 148 with derivation, complexity analysis, engineering mappings, and runnable code in multiple languages. Target Readers Hot100 learners building reusable linked-list templates Developers who struggle with split-and-reconnect pointer safety Engineers who want a clear answer to “why merge sort for linked lists” Background / Motivation Sorting linked structures appears in real systems: ...

February 10, 2026 · 9 min · map[name:Jeanphilo]

Hot100: Merge K Sorted Lists Divide-and-Conquer O(N log k) ACERS Guide

Subtitle / Summary LeetCode 23 is a k-way merge problem, not just repeating LeetCode 21 in a loop. This ACERS guide derives the optimal structure, explains tradeoffs between divide-and-conquer and min-heap, and provides runnable implementations in multiple languages. Reading time: 12-16 min Tags: Hot100, linked list, divide and conquer, merge SEO keywords: Merge K Sorted Lists, LeetCode 23, divide and conquer, O(N log k), Hot100 Meta description: A full ACERS explanation of Merge K Sorted Lists from naive ideas to O(N log k) divide-and-conquer, with engineering mapping and multi-language code. Target Readers Hot100 learners who have finished LeetCode 21 and want the next-level merge template Developers who need predictable performance for k-way ordered data merge Engineers preparing for linked-list and divide-and-conquer interview rounds Background / Motivation This problem appears in many production forms: ...

February 10, 2026 · 11 min · map[name:Jeanphilo]