1.

The worst case running time of a linear search on the self organizing list is ____(a) O(1)(b) O(logn)(c) O(n)(d) O(n^2)This key question is from Types of Lists in section Types of Lists of Data Structures & Algorithms IThis question was addressed to me during an interview.

Answer»

The correct answer is (C) O(n)

The best I can explain: Worst case OCCURS when the ELEMENT is located at the very end of list. So n comparisons must be made to the locate element. So the worst case running time of linear search on SELF organizing list is O(n).



Discussion

No Comment Found

Related InterviewSolutions