This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: delete traverse something new… which tree makes you happiest? 50 70 90 50 70 90 The “height balance” of a tree T is: b = height(T L )  height(T R ) A tree T is “height balanced” if: • • Binary Search Tree  is this tree “height balanced”? balanced trees  rotations 50 90 99 95 80 60 85 40 20 30 balanced trees  rotations 70 60 80 50 20 40 balanced trees  rotations 70 60 80 50 20 40 balanced trees  rotations summary: 1. there are 4 kinds: left, right, leftright, rightleft (symmetric!) 2. local operations (subtrees not affected) 3. constant time operations 4. BST characteristic maintained height balanced trees  we have a special name: Three issues to consider as we move toward implementation: Rotating Maintaining height Detecting imbalance...
View
Full Document
 Spring '09
 Heeren
 Binary Search, Height, greatest possible height

Click to edit the document details