My preferences among the different tastes of balanced binary trees are AVL trees. They are easier to program than any alternatives (see My implementation here and here , and note that even deleting is not particularly difficult) because there are fewer cases to consider, they provide a very slightly faster search (because they are more strictly balanced than alternatives) and there are no hidden worst cases or amortized time frames.
I also prefer AVL trees for hash tables. I know that the complexity of the hash tables with the expected time exceeds the guaranteed time complexity of the AVL trees, but in practice, constant factors make the two data structures generally competitive, and there are no problems associated with some unexpected data that cause poor behavior. In addition, I often find that once during the life of a program, in a situation that is not expected, when the initial selection of the hash table seemed correct, I need the data in sorted order, so I end up rewriting the program to use the Tree AVL instead of a hash table; do it enough time and you will find out that you can also start with AVL trees.
If your keys are strings, triple search attempts offer a reasonable alternative to AVL trees.
source share