Trading Space for Time: List to Tree
Given:
- Data: N = {i : i < k}, k is known & fixed
- Required procedures: sorted insert, delete, search
Linked list: all procedures O(n), space O(n), where n = |N|.
Balanced tree with additional invariants {values in left subtree < root, right subtree > root): procedures are O(?), space is O(?).