AVL tree
hardOne number per node - the balance factor - decides everything. Feed it sorted keys and watch it rotate after almost every insert, keeping the height under 1.44 log n forever.
Best
O(log n)Average O(log n)Worst O(log n)Space O(n)Loading the avl tree engine…