lecture22 - CSCI-255 Advanced Data Structures Lecture 22...

This preview shows pages 1–4. Sign up to view the full content.

CSCI-255 Advanced Data Structures Lecture 22

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Recap from Last Lecture b Asymptotic time complexity of basic BST operations (i.e., Search, Insert, Delete) is O( h ) where h is the height of the tree s BSTs are limited because of their bad worst-case performance O( n ), which is no more efficient than a regular linked list b Balanced search trees are trees whose heights in the worst case is O(lg n ) b A number of techniques to properly balance a binary tree s Some consist of deconstructing the tree, placing elements in array, sorting, and then reconstructing the tree s Some consist of constantly restructuring the tree when new elements arrive or elements are deleted and lead to an unbalanced tree (i.e., self-balancing trees)
AVL Trees b Tree rebalancing can be performed locally if only a portion of the tree is affected after insertion or deletion. An AVL tree is a self- balancing tree b AVL (Adel`son-Vel`skii and Landis) tree = s A BST s With the property : For every node, the heights of the

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/26/2009 for the course MATH AND C CSCI255 taught by Professor Dr.ikergondraluja during the Spring '09 term at St. Francis Xavier, Antigonish.

Page1 / 13

lecture22 - CSCI-255 Advanced Data Structures Lecture 22...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online