1.

What is the worst case time complexity of introsort?(a) O(n)(b) O(n log n)(c) O(n^2)(d) O(log n)The question was asked by my college professor while I was bunking the class.I'm obligated to ask this question of Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

Correct choice is (b) O(N log n)

The explanation is: Worst CASE TIME complexity of quicksort is AVOIDED when we implement introsort. Introsort switches to heap sort when there is a possibility of crossing the MAXIMUM depth limit.



Discussion

No Comment Found

Related InterviewSolutions