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 |
Define static data structures?
What is java priority queue?
What is an example of an array?
Define rehashing?
Where will be the free node available while inserting a new node in a linked list?
What are the advantages of selecetion sort?
What is best time complexity?
What is worst case complexity algorithm?
Which is better merge sort or quick sort?
Does arraylist allow null values?
What do you mean by selection sort?
How do you get placements?