12.07.2015 Views

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

460 Chap. 13 Advanced Tree <strong>Structures</strong>17179292G259925P991842G1889S72P7289S42 7575(a)(b)17 P8989 S17922592259918 729918 724275(c)42 75(d)Figure 13.10 Example of splaying after performing a search in a splay tree.After finding the node with key value 89, that node is splayed <strong>to</strong> the root by performingthree rotations. (a) The original splay tree. (b) The result of performinga zigzig rotation on the node with key value 89 in the tree of (a). (c) The resul<strong>to</strong>f performing a zigzag rotation on the node with key value 89 in the tree of (b).(d) The result of performing a single rotation on the node with key value 89 in thetree of (c). If the search had been for 91, the search would have been unsuccessfulwith the node s<strong>to</strong>ring key value 89 being that last one visited. In that case, thesame splay operations would take place.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!