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 the procedure to insert into a sorted array?
How many types of data structures are used?
If we try to add duplicate key to the hashmap, what will happen?
What is an array vs list?
What is hashing in cyber security?
How many types of data structure are there?
How do you declare An array of three char pointers
What is collision in data structure?
Define non linear data structure.
What is linear-logarithm chasm?
How can someone display singly linked list from first to last?
What do u mean by array?
What is stack in data structure with the example?
What is difference between hashmap and treemap?
What is linear and non linear structure?