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 |
What is a spanning tree?does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
What is meant by strongly connected in a graph?
Can a stack be described as a pointer? Explain.
what is Singly Linked list?
How do you separate zeros from non-zeros in an array?
Explain how is linked list implemented?
What are different types of algorithms?
what is a balanced tree.
What are the difference between malloc() and calloc()?
What does bubble sort do?
What happens when arraylist is full?
What is the types of data structure?