1.
Explain in detail why a balanced Binary Search Tree (specifically mentioning AVL or Red-Black Trees) is a suitable choice for designing a simplified database index for a column of user IDs. Emphasize its ability to support fast lookups, insertions, and deletions, and discuss the key properties of balanced BSTs that make them efficient for this purpose.
2.
Compare the performance characteristics of a balanced Binary Search Tree (BST) to a simple sorted array for the operations of lookup, insertion, and deletion. For each operation, provide a clear Big O notation analysis for both data structures. Discuss the trade-offs and scenarios where one might be preferred over the other.