Trees
Traversals, BSTs, and recursive tree walks.
Traversal
Depth-first and breadth-first visit orders.
- Tree traversals (Easy)
Prefix trees
Tries for word insert and search.
- Trie (prefix tree) (Medium)
Checkpoint
A graded check on recursive subtrees, traversal order, and tries.
Pattern Quest
Practice recognizing trees problem shapes.
Trees
Practice recursive subtree contracts, traversal orders, binary-search-tree invariants, path aggregation, and level-by-level reasoning over branching structures.
- Binary Search Tree Iterator (Medium)
- Binary Tree Maximum Path Sum (Hard)
- Binary Tree Right Side View (Medium)
- Binary tree traversal iteratively (Medium)
- Binary Tree Vertical Order Traversal (Medium)
- Binary Tree Zigzag Level Order Traversal (Medium)
- Convert Binary Search Tree to Sorted Doubly Linked List (Medium)
- Convert binary tree to doubly linked list (Medium)
- Convert sorted array to BST (Easy)
- Convert sorted linked list to BST (Medium)
- Count Good Nodes in Binary Tree (Medium)
- Find distance of two nodes (Medium)
- Find Kth largest in BST (Medium)
- Find Leaves of Binary Tree (Medium)
- Find lowest common ancestor (Medium)
- Flip tree (Easy)
- Get diameter (Medium)
- Get height (Easy)
- Inorder Successor in BST (Medium)
- Is balanced (Easy)
- Is BST (Medium)
- Is complete (Medium)
- Is subtree (Easy)
- Is symmetric (Easy)
- Level order (Medium)
- Longest Path With Different Adjacent Characters (Hard)
- Lowest Common Ancestor of a Binary Tree (Medium)
- Lowest Common Ancestor of a Binary Tree III (Medium)
- Monarchy succession order (Medium)
- N-ary tree diameter (Medium)
- N-ary tree distance of two nodes (Medium)
- N-ary tree height (Easy)
- N-ary tree level order (Medium)
- N-ary tree traversal iteratively (Easy)
- Path sum to K (Medium)
- Populate next pointers to right (Medium)
- Print all root to leaf paths (Easy)
- Print leaves (Easy)
- Print side view (Medium)
- Print vertical (Medium)
- Recover Binary Search Tree (Medium)
- Serialize and deserialize (Hard)
- Serialize and Deserialize Binary Tree (Hard)
- Step-By-Step Directions From a Binary Tree Node to Another (Medium)
- Sum of nodes (Easy)
- Vertical Order Traversal of a Binary Tree (Hard)