1.

In which of the following case does a tree sort become adaptive?(a) when implemented with an unbalanced tree(b) when implemented with a balanced tree(c) when implemented with a splay tree as BST(d) when implemented with AVL tree as BSTI have been asked this question in examination.The origin of the question is Sorting topic in chapter Sorting of Data Structures & Algorithms II

Answer»

The correct answer is (c) when implemented with a splay tree as BST

The best explanation: Tree SORT BECOMES an adaptive sort when it is implemented with a splay tree as a BST. In such a case the best case TIME complexity is better than (N LOG n).



Discussion

No Comment Found

Related InterviewSolutions