Trees have always been one of my favorite data structures, and this repository is where I document my journey of learning them from scratch.
The goal is not just to solve problems but to build a deep understanding of how trees work internally, why certain algorithms exist, and how different tree-based data structures are used in real systems.
- Learn concepts from first principles.
- Write every implementation myself.
- Focus on understanding before optimization.
- Document mistakes, observations, and learnings.
- No AI-generated code.
-
Tree Terminology
-
Binary Trees
-
Tree Traversals
- Preorder
- Inorder
- Postorder
- Level Order
- Insertion
- Deletion
- Search
- Validation
- AVL Trees
- Red-Black Trees
- Segment Trees
- Fenwick Trees (Binary Indexed Trees)
- Tries
- B-Trees
- B+ Trees
- Depth First Search (DFS)
- Breadth First Search (BFS)
- Lowest Common Ancestor (LCA)
- Tree Diameter
- Path Sum Problems
- Tree Dynamic Programming
trees/
├── basics/
├── traversals/
├── binary_search_tree/
├── avl_tree/
├── segment_tree/
├── trie/
├── problems/
└── notes/
Most resources teach tree algorithms in isolation. This repository is my attempt to learn them systematically, connect concepts together, and maintain a public record of my progress.
- Tree Basics
- Traversals
- Binary Search Trees
- AVL Trees
- Red-Black Trees
- Segment Trees
- Fenwick Trees
- Tries
- B-Trees
- Advanced Tree Algorithms
This repository is a learning journal. Code may evolve, be refactored, or even contain mistakes as my understanding grows. The focus is on learning publicly and improving over time.
Happy Learning! 🌳