Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Outline

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.