Hide text Hide pseudo-code | |
Insert the given keys into the initially empty AVL-tree. If there are equal keys they are always inserted into the right branch of the existing node. Some additional problems. | 1 Do Binary Search Tree Insert (recursive algorithm) 2 While the recursion returns, keep track of
3 If p is unbalanced, do one of the following rotations:
|