06.09.2014 Views

Splay Trees

Splay Trees

Splay Trees

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

a) b)<br />

c)<br />

d)<br />

Figure 4. Insertion steps in a splay tree<br />

1.3.3.2 Join Example<br />

There are given two splay trees. They are presented in figures 5.a and 5.b. The figure 5.c presents<br />

the resulted tree.<br />

The first step is to perform a MEMBER operation on the largest key in the first splay tree. This<br />

operation will bring node with key 15 in the root position for the first splay tree.<br />

The second step is to link the root of the second splay tree as right child of the previously obtained<br />

root for the first slay tree. After this step the tree from figure 5.c is obtained.<br />

9

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

Saved successfully!

Ooh no, something went wrong!