AVL Trees
Balanced binary search tree offer a O(log n) insert and delete.
But balancing itself costs O(n) in the average case.
In this case, even though delete will be O(log n), insert will be O(n).
Is there any way to have a O(log n) insert too?
Yes, by almost but not fully balancing the tree : AVL (Adelson Velskii and Landis) balancing