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 / sathyanarayana

Yes, its insertion sort. For a sorted array, it takes just
O(n) time. iTs mere traversal of an array as it is already
sorted. In the case of quick sort, it boils down to O(n^2)
in the case of sorted array.

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are b trees used?

868


What do you mean by balance factor of a node in avl tree?

926


Does list allow null values?

927


What is heap tree in data structure?

928


Explain what are the methods available in storing sequential files ?

937


Why is quicksort unstable?

957


What is fibonacci search?

993


Which is the parent class of hashmap class?

1148


How can you correct these errors?

991


Write a Program for Insert in a sorted list

922


What are linear and non linear data structures?

871


How can we remove loops in a linked list? What are the functions of fast and slow pointers?

1170


What are the five examples of data?

977


Why do we use linked lists?

908


What is arrays copyof?

871