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

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

View Full Document Right Arrow Icon
Splay Trees Binary search trees. Search, insert, delete, and split have amortized complexity O(log n) 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.
Background image of page 1

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

View Full DocumentRight Arrow Icon
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.
Background image of page 2
If there is a pair whose key is k , the node containing this pair is the splay node. Otherwise, the parent of the external node where the search terminates is the splay node. 20
Background image of page 3

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

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

This note was uploaded on 12/07/2010 for the course COT 5536 taught by Professor Sartajsahani during the Spring '10 term at University of Florida.

Page1 / 32

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

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

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