This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full 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