LC 94

Binary Tree Inorder Traversal

Easy · LC 1–100 + first-family candidate

binary-treedepth-first-searchstacktree
Free

Candidate solution routes

Primary

Tree recursive aggregation

Free

Invariant: dfs(u) returns a summary concerning only u's subtree and satisfying its parent contract; before return, every global candidate fully contained in that subtree has been considered.

candidate confidence: 0.665 · metadata_only

Alternate 1

DFS Components and Reachability

Free

Invariant: Once marked visited, a vertex belongs to the component represented by the current search and can never join a later component.

candidate confidence: 0.610 · metadata_only

How to use this page

Read the statement and constraints first, then validate recognition signals, invariant, and complexity. Candidate score is not correctness evidence.