CS223-0205-AVL

CS223-0205-AVL - AVL Tree Neil Tang 02/05/2008 CS223...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CS223 Advanced Data Structures and Algorithms 1 AVL Tree AVL Tree Neil Tang Neil Tang 02/05/2008 02/05/2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS223 Advanced Data Structures and Algorithms 2 Class Overview Class Overview Definition Tree height Tree rotation: single and double Insertion with rotations
Background image of page 2
CS223 Advanced Data Structures and Algorithms 3 Definition Definition An AVL tree is a special binary search tree in which for each node, the heights of its left and right subtree can differ by at most 1.
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS223 Advanced Data Structures and Algorithms 4 Height Height Upper bound: 1.44log(N+2)-1.328 In practice, slightly more than logN.
Background image of page 4
5 Cases Causing Violation Cases Causing Violation An insertion to the left subtree of the left child of a node. An insertion to the right subtree of the left child of a node. An insertion to the left subtree of the right child of a node.
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/17/2008 for the course CS 223 taught by Professor Tang during the Spring '07 term at MSU Bozeman.

Page1 / 15

CS223-0205-AVL - AVL Tree Neil Tang 02/05/2008 CS223...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online