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

How would you use qsort() function to sort the name stored in an array of pointers to string?

995


What is the space complexity of bubble sort?

1054


Is boolean a data type?

1024


What is the difference between arraylist and hashmap?

1097


What is a subtree in data structures?

1011


What is a vector class?

922


Which is faster array or arraylist?

947


How long does it take to master data structures and algorithms?

1192


What is difference between array and arraylist? When will you use array over arraylist?

1038


What do you mean by articulation point?

1063


What are types of Collision Resolution Techniques and the methods used in each of the types?

1127


Define outdegree of a graph?

1014


What the principle of quick sort and its complexity?

1045


What member function places a new node at the end of the linked list?

1122


Provide an algorithm to reverse a linked list without using recursion.

986