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
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 |
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 |
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 |
State the different types of linked lists?
What is max heapify?
Which data structures are used in bfs and dfs algorithm?
Different Types of pattern?
What is data type in data structure?
What is the difference between array and list?
Why is quicksort so fast?
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?
Why would you use a linked list?
What is collision in data structure?
Why do we use different types of data structures?