A list is ordered from smaller to largest when a sort is
called. Which sort would take the shortest time to execute?
Answer Posted / soumitra biswas
modified bubble sort with flag.As the array is already sorted
there will be no swapping in first pass,so no comparison
will take place after first pass and program stops executing.
time complexity =0(n).
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is a simple graph?
What is sorting with example?
What is difference between tree and forest?
Explain extended binary tree.
Can map contain duplicate keys?
How many types of linked lists are there?
What is the basic of data structure?
What is data structure and why it is important?
How to find the missing element in integer array of 1 to 7?
What is best time complexity?
Which is faster treemap or hashmap?
What is difference between hashmap and arraylist?
What is reduction to sorting method?
Define rehashing?
What is the difference between hashset and arraylist?