A splay tree is a binary search tree with amortised


A splay tree is a binary search tree with amortised complexity O(log(n)) peroperation.

(i) What is meant by amortised complexity?

(ii) Draw the three different splay rotations that may be applied when thetarget node is the left child of its parent. Take care to include the locationof subtrees before and after each rotation.

(iii) Why is a red-black tree a better general-purpose search structure than asplay tree? Under what circumstances would you choose to implement asplay tree in preference to a red-black tree, and why?

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: A splay tree is a binary search tree with amortised
Reference No:- TGS01569124

Now Priced at $10 (50% Discount)

Recommended (92%)

Rated (4.4/5)