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

Answers were Sorted based on User's Feedback



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

Answer / sourav naskar

quick sort cant be the answer as this methods works best
when the list is completely unsorted.In this the method
would have worked best if it is descendingly sorted.As it
is completely sorted the answer is insertion sort which
takes O(n).

Is This Answer Correct ?    1 Yes 2 No

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

Answer / sarvesh

insertion is answer....as there is no case of swapping as
no. are in ordered pair..so less time will will be taken

Is This Answer Correct ?    1 Yes 2 No

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

Answer / gautam

heap sort is the correct answer because it requires log(n)
time where n is the number of nodes

Is This Answer Correct ?    0 Yes 1 No

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

Answer / sailakshmi.s

straight insertion

Is This Answer Correct ?    0 Yes 3 No

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

Answer / ganesan

quick sort

Is This Answer Correct ?    2 Yes 12 No

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

Answer / pavan

Quick Sort

Is This Answer Correct ?    2 Yes 12 No

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

Answer / dwiti

Selection Sort

Is This Answer Correct ?    0 Yes 12 No

Post New Answer

More Data Structures Interview Questions

State the different types of linked lists?

0 Answers  


What is max heapify?

0 Answers  


Which data structures are used in bfs and dfs algorithm?

0 Answers  


Different Types of pattern?

0 Answers   Wipro,


What is data type in data structure?

0 Answers  






What is the difference between array and list?

0 Answers  


Why is quicksort so fast?

0 Answers  


Convert following infix expression to the prefix expression. a - b + c * (d / e - (f + g))

33 Answers   Amazon, Microsoft, Star Technologies, Sun Microsystems, Wipro,


Is arraylist fail fast?

0 Answers  


Why would you use a linked list?

0 Answers  


What is collision in data structure?

0 Answers  


Why do we use different types of data structures?

0 Answers  


Categories