Contents    Page-10    Prev    Next    Page+10    Index   

AVL Trees

An AVL Tree [G. M. Adel'son-Vel'skii and E. M. Landis, Soviet Math. 3, 1259-1263, 1962; D. Knuth, The Art of Computer Programming, vol. 3: Sorting and Searching, Addison-Wesley, 1973, section 6.2.3.] is a binary tree that is approximately height-balanced: left and right subtrees of any node differ in height by at most 1.

Advantage: Approximately O(log n) search and insert time.

Disadvantage: Somewhat complex code (120 - 200 lines).

[htb]