1.

To which datastructure are skip lists similar to in terms of time complexities in worst and best cases?(a) balanced binary search trees(b) binary search trees(c) binary trees(d) linked listsThe doubt is from Skip List in chapter Types of Lists of Data Structures & Algorithms IThis question was posed to me during a job interview.

Answer»

Correct answer is (a) balanced BINARY search trees

The explanation is: Skip LISTS are similar to any RANDOMLY built binary search tree. a BST is balanced because to avoid skew tree formations in case of sequential input and HENCE achieve O(logn) in all 3 CASES. now skip lists can gurantee that O(logn) complexity for any input.



Discussion

No Comment Found

Related InterviewSolutions