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

How many parts are there in a declaration statement?

1050


What is the use of space complexity and time complexity?

1075


Define binary tree insertion.

1022


Which sorting algorithm is worst?

953


Is array a collection?

972


What is Doubly link list?

1005


How do you use the sort function?

888


How null key is handled in hashmap?

951


In depth questions regarding the data structures and the Databases used in the Projects developed.

1009


How many types of priority queue are there?

964


Which sorting is best in time complexity?

1005


Explain what are the major data structures used in the network data model?

1143


What is an array vs list?

903


Can arraylist have null values?

907


Name few collections map implementations?

948