Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Trees

Binary trees, binary search trees, and tree traversal problems.

Key Concepts Covered

  • Tree traversals (inorder, preorder, postorder, level-order)
  • Binary Search Tree (BST) operations
  • Tree construction from traversals
  • Lowest Common Ancestor (LCA)
  • Tree diameter and height
  • Binary lifting
  • Morris traversal (O(1) space)
  • Tree views (left, right, vertical)
  • Balanced trees

Problems in this Directory

Tree Traversals

Tree Properties

Lowest Common Ancestor (LCA)

Tree Views

Tree Construction

Binary Search Tree (BST)

Binary Lifting & Advanced

Special Problems

Tips

  • Master recursion for tree problems
  • Use NULL checks to avoid segfaults
  • Draw trees while solving
  • Remember: Inorder of BST is sorted
  • Practice both recursive and iterative approaches