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]

LeetCode 133: Clone Graph Hash Map + DFS/BFS ACERS Guide

Subtitle / Summary Clone Graph is not a traversal-only problem. The real challenge is preserving graph structure while avoiding duplicate copies in the presence of cycles. The stable solution is a traversal plus a hash map from original nodes to cloned nodes. Reading time: 12-15 min Tags: graph, dfs, bfs, hash map, deep copy SEO keywords: Clone Graph, graph deep copy, DFS, BFS, LeetCode 133 Meta description: Deep-copy an undirected graph with a node-to-node map, explaining why memoization is mandatory and how DFS/BFS versions work, with runnable code in six languages. Target Readers LeetCode learners practicing graph traversal and deep-copy patterns Engineers who duplicate object graphs, workflow graphs, or topology graphs Developers who want one reusable template for “clone with cycles” Background / Motivation Many “copy” problems are actually identity-preservation problems. ...

March 19, 2026 · 11 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: 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]

Connected Components and Strongly Connected Components: Tarjan / Kosaraju ACERS Engineering Analysis

Subtitle / Abstract Components are foundational for graph algorithms: undirected graphs ask “are nodes connected,” while directed graphs ask “are nodes mutually reachable.” Following the ACERS template, this article moves from naive methods to Tarjan / Kosaraju, then shows production graph-database use cases with runnable multi-language code. Estimated reading time: 14-18 minutes Tags: Graph Theory, Connected Components, SCC, Tarjan SEO keywords: Connected Components, SCC, Tarjan, Kosaraju, graph database Meta description: From undirected connected components to directed SCCs, with clear Tarjan/Kosaraju mechanics, complexity, and production rollout guidance. Target Audience Learners who need BFS/DFS to become second nature Engineers doing subgraph analysis and partition planning in graph-database systems Intermediate developers who want one unified framework for “undirected CC + directed SCC” Background / Motivation In production, you quickly hit three types of questions: ...

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

BFS / DFS Engineering Primer: k-hop Queries, Subgraph Extraction, and Path Existence ACERS Breakdown

Subtitle / Abstract BFS / DFS are not just about “being able to code them.” You need production-ready behavior, predictable cost, and provable correctness. Following the ACERS structure, this article breaks three common tasks (k-hop query, subgraph extraction, and path existence) into reusable templates: iterative implementation + early stop + visited structure selection. Estimated reading time: 12-16 minutes Tags: Graph, BFS, DFS, k-hop, subgraph extraction SEO keywords: BFS, DFS, k-hop query, subgraph extraction, path existence, visited bitmap, bloom filter Meta description: BFS/DFS for engineering scenarios: iterative implementations to avoid stack overflow, early stop to cut search cost, and visited bitmap/bloom to optimize memory and dedup performance. Target Audience Engineers working on graph databases, risk-control relationship graphs, or call-chain analysis Learners who can write “problem-solution style BFS/DFS” but do not yet have engineering templates Developers who want traversal code that is stable, observable, and extensible Background / Motivation In production systems, BFS/DFS is usually not a one-off offline script. It is part of an online request path: ...

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