A list is ordered from smaller to largest when a sort is
called. Which sort would take the shortest time to execute?
Answer Posted / rohit
Bubble sort with a flag variable to check if comparisons
occur or not. If it is already sorted then in just 1
iteration it will show that the array is sorted which is
not possible in any other sort.THUS JUST 1 ITERATIION IS
REQUIRED IN THIS CASE.
| Is This Answer Correct ? | 27 Yes | 2 No |
Post New Answer View All Answers
Can treemap key null?
How do you find the space complexity of a bubble sort?
Name the areas in which you can apply data structures extensively?
What is non linear structure?
Explain recursive function & what is the data structures used to perform recursion?
Advanced problems related to Data Structures were asked
What is a weighted graph?
Which data structure is applied when dealing with a recursive function?
Which of the collections allows null as the key?
Does treemap allow duplicate keys?
What is a singletonlist?
What is the complexity of arraylist?
What stack means?
What is a vector element?
Define threaded binary tree. Explain its common uses