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 difference between queues and linked lists?
What is the use of sorting?
What is insertion sort technique?
Write the disadvantages of separate chaining?
When will you sort an array of pointers to list elements, rather than sorting the elements themselves?
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.
Which is faster arraylist or hashmap?
What is dynamic array in excel?
List out the basic operations that can be performed on a stack?
How do you find the height of a binary tree?
Describe queue operation.
Define root?