1.

What is the average time complexity of introsort?(a) O(n)(b) O(n log n)(c) O(n^2)(d) O(log n)The question was asked in semester exam.The query is from Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

Right ANSWER is (b) O(n log n)

Easiest EXPLANATION - Average time complexity of introsort REMAINS to be O(n log n) as for most of the cases QUICK sort and heap sort are used which have O(n log n) time complexity for an average case.



Discussion

No Comment Found

Related InterviewSolutions