Trees and binary search trees
Practice this questionWANT TO UNDERSTAND THE CONCEPT FIRST?Learn 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
Adapted from 14_DSA_MASTER.md · “8. Trees and binary search trees”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.