Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Where will be the free node available while inserting a new node in a linked list?

922


Differentiate between iterable and iterator.

1092


Suppose in an integer array, there is 1 to 100 number, out of one is duplicate, how to find?

959


Is array static or dynamic?

869


How does a selection sort work for an array?

918


Why is quicksort better than mergesort?

917


Why do we use collections?

888


Are linked lists useful?

899


Can we increase the size of statically allocated array?

881


Why do we need to recycle?

850


Write any two principles of gradation of structures.

980


What is the family trees and connection by clause?

888


Does arraylist maintain insertion order?

825


What is the need for extendible hashing?

967


What are the different types of hash functions?

943