Skip to content
Codeloom

Topics / Trees

🌳

Trees

Binary trees, BSTs, traversals, and the recursion patterns that solve most tree problems in 10 lines.

Why learn Trees?

  • Foundation for graphs and dynamic programming on graphs.

  • Most tree problems are 5–15 line recursive solutions once you see the pattern.

  • BSTs appear inside databases, file systems, and indexes.

What you can build with Trees

Tree traversals (DFS, BFS, level-order) BSTs and balanced trees Trie-based prefix problems

Trees tutorials

1 article · page 1 of 1

Hand-written tutorials, ordered as a recommended learning path.

  1. 01 Tree Traversal Master every tree traversal method with recursive, iterative, and Morris traversal implementations, plus classic LeetCode tree problems.