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 / soumitra biswas

modified bubble sort with flag.As the array is already sorted
there will be no swapping in first pass,so no comparison
will take place after first pass and program stops executing.
time complexity =0(n).

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a simple graph?

899


What is sorting with example?

837


What is difference between tree and forest?

844


Explain extended binary tree.

897


Can map contain duplicate keys?

800


How many types of linked lists are there?

817


What is the basic of data structure?

927


What is data structure and why it is important?

873


How to find the missing element in integer array of 1 to 7?

892


What is best time complexity?

786


Which is faster treemap or hashmap?

827


What is difference between hashmap and arraylist?

910


What is reduction to sorting method?

882


Define rehashing?

987


What is the difference between hashset and arraylist?

912