You know, besides the other comment about not implementing data structures in a real job¹, why do people insist on memorizing all that trivia about balancing binary trees instead of just using some much simpler self balancing structure like a B-tree²?
1 - I have. But it is overwhelming more likely that you'll just need to know their characteristics than how to implement them.
1 - I have. But it is overwhelming more likely that you'll just need to know their characteristics than how to implement them.
2 - And get better caching behavior for free.