Set 08 - Binary Trees

Use Practice Loop if you need a reset.

Problems

ProblemDifficultyPatternVideo
LC 226. Invert Binary TreeEasyDFS RecursiveVideo
LC 104. Maximum Depth of Binary TreeEasyDFSVideo
LC 100. Same TreeEasyDFS CompareVideo
LC 572. Subtree of Another TreeEasyDFS + Same TreeVideo

Deliverables

  • Write a 1-line invariant for each problem.
  • Note 1 edge case or pitfall per problem.
  • Record time-to-first-correct solution.

Notes

  • LC 226: swap left/right in DFS; base case null.
  • LC 104: depth = 1 + max(left, right).
  • LC 100: DFS compare values and structure.
  • LC 572: DFS each node + sameTree check.

Review

  • Time spent + where you got stuck?
  • Biggest mistake or missed edge case?
  • One concrete improvement for next time.

Comments

Share your approach or ask questions

0 comments
?
|
Markdown supported
Sign in to post

Loading comments...