Slide 14.3: A binary search tree (cont.) Slide 14.5: An AVL tree Home |
A tree where the height of the shortest path to a leaf does not differ from the height of the longest path by more than one level.For example, the following eight keys are entered to the previous tree in the sequence in which they appear: LV NP MB TM LA UF ND TS NK.
Search performance for such an unbalanced tree is very poor because it needs many disk seeks. For example, it needs to check 9 nodes to search for the key NK. |