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
Where will be the free node available while inserting a new node in a linked list?
Differentiate between iterable and iterator.
Suppose in an integer array, there is 1 to 100 number, out of one is duplicate, how to find?
Is array static or dynamic?
How does a selection sort work for an array?
Why is quicksort better than mergesort?
Why do we use collections?
Are linked lists useful?
Can we increase the size of statically allocated array?
Why do we need to recycle?
Write any two principles of gradation of structures.
What is the family trees and connection by clause?
Does arraylist maintain insertion order?
What is the need for extendible hashing?
What are the different types of hash functions?