13 Splay Trees Diagrams

# 13 Splay Trees Diagrams - Zig-Zag Splits the path into two...

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

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Zig-Zag Splits the path into two: nodes < x and Zig-Zig Shortens the path to x to half the length Lengthens path of its branches by one. Top-down move—to—root(x) Splits the tree into two subtrees: nodes < x and nodes > x Top-down splay (x) Splits the tree into two subtrees: nodes < x and nodes > x and halves path chains Huffman’s algorithm .1“ count(.r) code(.1') a. 46 O h ‘25 \o C 8 \OX (1 6 \ooo e 4 \oo‘o f 2 loot\ Leafqueue: 96?} 21/655 9m 3m 25/69 4/0/63. ‘ Parent queue: W3 £2154) 25926;) “(yams C\\(\$Q&<L¢) Huffman’s algorithm, example 2 .1' count(.r) code(1) a 40 oo 1) 40 0‘ C 25 “ (:1 7 \oH e 4 \000 f 4 100\ g 2 \O\°O 11 ‘2 ‘0‘0‘0 1 1 (olo\\ Leafqueue: X36 '4 x44 .24 H6 W Parent queue: 6 )5 a? V2 7,6 46 \$45 125 ...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern