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 are the advantages of binary search over linear search?
What are the Advantages and disadvantages of Array?
What is a stable sorting algorithm?
Why would you use a linked list?
Which language is best for data structures?
What is adt and its advantages?
What are the disadvantages of using collection classes over arrays?
What is the purpose of thread?
What is sequential search? What is the average number of comparisons in a sequential search?
Define secondary clustering?
What is structure of data type?
What is m way tree in data structure?
What is data and data structure?
What are the types of data structures?
What is numeric array?