lec25 - Splay Trees Binary search trees. Search, insert,...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Splay Trees Binary search trees. Search, insert, delete, and split have amortized complexity O(log n) & actual complexity O(n) . Actual and amortized complexity of join is O(1) . Priority queue and double-ended priority queue versions outperform heaps, deaps, etc. over a sequence of operations. Two varieties. Bottom up. Top down. Bottom-Up Splay Trees Search, insert, delete, and join are done as in an unbalanced binary search tree. Search, insert, and delete are followed by a splay operation that begins at a splay node . When the splay operation completes, the splay node has become the tree root. Join requires no splay (or, a null splay is done). For the split operation, the splay is done in the middle (rather than end) of the operation. Splay Node search(k) If there is a pair whose key is k , the node containing this pair is the splay node....
View Full Document

Page1 / 16

lec25 - Splay Trees Binary search trees. Search, insert,...

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

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