DDSA Solutions

Binary Search Tree

8 problems

A BST maintains the invariant: left subtree values < node < right subtree values. This gives O(h) search/insert/delete; O(log n) for balanced trees. In-order traversal yields sorted output. Use range checks ([min, max]) to validate BST property and find floor/ceiling.