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

Can treemap key null?

983


How do you find the space complexity of a bubble sort?

789


Name the areas in which you can apply data structures extensively?

887


What is non linear structure?

945


Explain recursive function & what is the data structures used to perform recursion?

980


Advanced problems related to Data Structures were asked

873


What is a weighted graph?

977


Which data structure is applied when dealing with a recursive function?

969


Which of the collections allows null as the key?

800


Does treemap allow duplicate keys?

788


What is a singletonlist?

838


What is the complexity of arraylist?

875


What stack means?

855


What is a vector element?

857


Define threaded binary tree. Explain its common uses

811