Question: What is the main purpose of balancing in AVL and Red-Black trees?
Options:
Correct Answer: To ensure O(log n) time complexity for operations
Solution:
The main purpose of balancing in these trees is to ensure that operations can be performed in O(log n) time.