type
Binary Search Tree LeetCode problems — visual solutions
Every LeetCode problem tagged Binary Search Tree — the full catalogue, plus animated visual solutions in Python and Go when a deep-dive exists.
43 problems · 30 animated · 13 locked
Full BST index
- 95Unique Binary Search Trees IIWatch
- 96Unique Binary Search TreesWatch
- 98Validate Binary Search TreeWatch
- 99Recover Binary Search TreeWatch
- 108Convert Sorted Array to Binary Search TreeWatch
- 109Convert Sorted List to Binary Search TreeWatch
- 173Binary Search Tree IteratorWatch
- 230Kth Smallest Element in a BSTWatch
- 235Lowest Common Ancestor of a Binary Search TreeWatch
- 255Verify Preorder Sequence in Binary Search TreeLocked
- 270Closest Binary Search Tree ValueLocked
- 272Closest Binary Search Tree Value IILocked
- 285Inorder Successor in BSTLocked
- 333Largest BST SubtreeLocked
- 426Convert Binary Search Tree to Sorted Doubly Linked ListLocked
- 449Serialize and Deserialize BSTWatch
- 450Delete Node in a BSTWatch
- 501Find Mode in Binary Search TreeWatch
- 510Inorder Successor in BST IILocked
- 530Minimum Absolute Difference in BSTWatch
- 538Convert BST to Greater TreeWatch
- 653Two Sum IV - Input is a BSTWatch
- 669Trim a Binary Search TreeWatch
- 700Search in a Binary Search TreeWatch
- 701Insert into a Binary Search TreeWatch
- 703Kth Largest Element in a StreamWatch
- 776Split BSTLocked
- 783Minimum Distance Between BST NodesWatch
- 897Increasing Order Search TreeWatch
- 938Range Sum of BSTWatch
- 1008Construct Binary Search Tree from Preorder TraversalWatch
- 1038Binary Search Tree to Greater Sum TreeWatch
- 1214Two Sum BSTsLocked
- 1305All Elements in Two Binary Search TreesWatch
- 1373Maximum Sum BST in Binary TreeWatch
- 1382Balance a Binary Search TreeWatch
- 1569Number of Ways to Reorder Array to Get Same BSTWatch
- 1586Binary Search Tree Iterator IILocked
- 1902Depth of BST Given Insertion OrderLocked
- 1932Merge BSTs to Create Single BSTWatch
- 2476Closest Nodes Queries in a Binary Search TreeWatch
- 3526Range XOR Queries with Subarray ReversalsLocked
- 3831Median of a Binary Search Tree LevelLocked