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
How do you create a tree diagram?
What is difference between hashmap and linkedhashmap?
What is the minimum number of queues that can be used to implement a priority queue?
How do you use merge sort?
Is hashmap fail safe?
What are the 3 types of measurement?
What are the advantages of binary search over linear search?
What are hashmaps good for?
Which is faster treemap or hashmap?
what is the difference between singly and doubly linked lists?
Give the example of validating the parenthesis of expression using stack.
Does treeset allow null?
What is the idea behind splaying?
What is an ordered list?
How do you find the index of an element in an arraylist?