Trees and binary search trees
Binary tree
Each node has at most two children.
Problems to practice
- Inorder traversal
- Preorder traversal
- Postorder traversal
- Level order traversal
- Height of tree
- Diameter of binary tree
- Lowest common ancestor
- Validate BST
- Symmetric tree
- Path sum
Binary search tree
Left subtree smaller, right subtree larger.
Problems to practice
- Insert, search, delete
- Kth smallest element
- Inorder traversal gives sorted order
- Lowest common ancestor in BST
Patterns
- DFS recursion
- BFS queue
- stack for iterative traversal
Can you explain it without the notes?
Trees and binary search trees
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Binary tree
Turn this concept into a clear answer.
Practice this conceptAdapted from 14_DSA_MASTER.md · “8. Trees and binary search trees”. Examples are study fragments; framework behavior can depend on your version.