A list is ordered from smaller to largest when a sort is
called. Which sort would take the shortest time to execute?

Answer Posted / sathya

Insertion sort works with an efficiency of O(n) if the array
is already sorted. Hence, this algo can be used.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you free the memory that is allocated at run time?

708


How do you sort an arraylist?

652


What is the use of placement new?

770


What is bubble sort?

684


What do you mean by secondary clustering?

681


What is the minimum number of nodes in an avl tree of height h?

633


What are the tasks performed during postorder traversal?

704


How to sort an Array?

715


Complete structure of hashmap, very detail description, along with the basic coding of the hashmap internal implementation.

844


What do you mean by collision in hashing?

721


What is time complexity of quick sort?

645


Is hashmap a collection?

688


Suppose in an integer array, there is 1 to 100 number, out of one is duplicate, how to find?

733


What stack means?

660


Does treeset allow null values?

691