1.

What is the best case time complexity of cube sort?(a) O(n^2)(b) O(n)(c) O(n log n)(d) O(1)I have been asked this question in examination.My doubt is from Sorting in chapter Sorting of Data Structures & Algorithms II

Answer»

Right option is (b) O(n)

The best I can EXPLAIN: Best case time complexity of CUBE SORT OCCURS when the input ARRAY is almost sorted. So in such a case only O(n) time is required for sorting.



Discussion

No Comment Found

Related InterviewSolutions