Skip to content

tarantua/learn-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Trees From Scratch 🌳

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.

Philosophy

  • Learn concepts from first principles.
  • Write every implementation myself.
  • Focus on understanding before optimization.
  • Document mistakes, observations, and learnings.
  • No AI-generated code.

Topics Covered

Fundamentals

  • Tree Terminology

  • Binary Trees

  • Tree Traversals

    • Preorder
    • Inorder
    • Postorder
    • Level Order

Binary Search Trees

  • Insertion
  • Deletion
  • Search
  • Validation

Advanced Trees

  • AVL Trees
  • Red-Black Trees
  • Segment Trees
  • Fenwick Trees (Binary Indexed Trees)
  • Tries
  • B-Trees
  • B+ Trees

Algorithms & Patterns

  • Depth First Search (DFS)
  • Breadth First Search (BFS)
  • Lowest Common Ancestor (LCA)
  • Tree Diameter
  • Path Sum Problems
  • Tree Dynamic Programming

Repository Structure

trees/
├── basics/
├── traversals/
├── binary_search_tree/
├── avl_tree/
├── segment_tree/
├── trie/
├── problems/
└── notes/

Why This Repository Exists

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.

Progress

  • Tree Basics
  • Traversals
  • Binary Search Trees
  • AVL Trees
  • Red-Black Trees
  • Segment Trees
  • Fenwick Trees
  • Tries
  • B-Trees
  • Advanced Tree Algorithms

Disclaimer

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! 🌳

About

Trees are one of my favorite data structures, and this repository documents my journey of learning them from scratch. From basic traversals to advanced algorithms, every implementation and explanation is written by me as I learn. No AI-generated code, just my own understanding, experiments, and progress, one commit at a time.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages