1.

What is the best case time complexity of introsort?(a) O(n)(b) O(n log n)(c) O(n^2)(d) O(log n)The question was posed to me in my homework.Query is from Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

The CORRECT choice is (B) O(n LOG n)

Easy explanation - Introsort is mainly governed by HEAP sort and QUICK sort. As the best case of both heap sort and quick sort is O(n log n) so the best case of introsort also becomes O(n log n).



Discussion

No Comment Found

Related InterviewSolutions