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

What are different techniques for making hash function? Explain with example.

545


Explain the types of linked lists.

559


How do you balance a tree?

513


Define balancing condition for AVL Tree.

549


Is array a linked list?

481






What are the advantages of linked list?

427


Differentiate between arraylist and vector.

855


A lot of data structures related programs related to only trees and graphs, like the diameter of a tree, removing the loops in a graph etc.

521


Explain what is the type of the algorithm used in solving the 8 queens problem?

475


How do you use merge sort?

442


How does insertion sort works?

511


In what data structures are pointers applied?

601


What are the properties of binary heap?

547


What package is arraylist?

563


What are the four characteristics of algorithms?

470