In which of the following self – balancing binary search tree the recently accessed element can be accessed quickly?

Category: QuestionsIn which of the following self – balancing binary search tree the recently accessed element can be accessed quickly?
Editor">Editor Staff asked 4 weeks ago

In which of the following self – balancing binary search tree the recently accessed element can be accessed quickly?
 
(a) AVL tree
 
(b) AA tree
 
(c) Splay tree
 
(d) Red – Black tree
 
This intriguing question originated from Binary Trees in section Binary Trees of Data Structures & Algorithms I
 
The question was asked during an online exam.

1 Answers
Editor">Editor Staff answered 4 weeks ago

Right answer is (c) Splay tree
 
For explanation: In a Splay tree, the recently accessed element can be accessed quickly. In Splay tree, the frequently accessed nodes are moved towards the root so they are quick to access again.