What is the best case time complexity of permutation sort?

Answer: b
Explanation: Best case time complexity of permutation sort occurs when the input array is already sorted. So in such a case we only need to check whether all the elements are sorted which can be done in O(n) time.
 

Tìm kiếm

Back
Top