March 2019
Intermediate to advanced
336 pages
9h 9m
English
Adelson, Velski, and Landis pioneered the AVL tree data structure and hence it is named after them. It consists of height adjusting binary search trees. The balance factor is obtained by finding the difference between the heights of the left and right sub-trees. Balancing is done using rotation techniques. If the balance factor is greater than one, rotation shifts the nodes to the opposite of the left or right sub-trees. The search, addition, and deletion operations are processed in the order of O(log n).
The following sections talks about the KeyValue interface definition and the TreeNode class. For this section, please refer to the avl_tree.go file.
Read now
Unlock full access