1.

What is the worst case time complexity of Tim sort?(a) O(n)(b) O(n log n)(c) O(n^2)(d) O(log n)The question was asked by my college director while I was bunking the class.I'd like to ask this question from Sorting in chapter Sorting of Data Structures & Algorithms II

Answer»

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

Easy explanation - WORST case TIME complexity of Tim SORT is O(n log n). It is because the worst complexity of merge sort is O(n log n) and INSERTION sort is only applied for small arrays.



Discussion

No Comment Found

Related InterviewSolutions