This preview shows page 1. Sign up to view the full content.
Unformatted text preview: own right child, and then replace z
b y y. CSE 2331/5331 Delete together cover
Cases 1 & 2. Time complexity:
O(h) CSE 2331/5331 An Exercise Delete I ? Delete G ? Delete K ? Delete B ? CSE 2331/5331 Remarks
n All complexity depends on height h
h = (lg n), h = (n)
To guarantee performance:
n n Balanced tree ! Randomly build a tree
n Expected height is O(lg n)
Still problem: future insertions … CSE 780 Algorithms...
View Full Document
This document was uploaded on 02/24/2014 for the course CSE 2331 at Ohio State.
- Spring '12