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 longest time to execute?

Answer Posted / rahul

When the elements are ordered in either Ascending or Descending order, Quick sort behaves Equivalent to Merge sort. Time complexity of O(nlogn) is taken for sorting.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better hashset or treeset?

956


What are the major data structures used in the rdbms?

988


What is array and structure?

936


Which is better merge or quick sort?

905


Which programming language is best for data structures?

854


Why is arraylist not thread safe?

885


Explain implementation of deletion from a binary tree.

931


If you are given a choice to use either arraylist and linkedlist, which one would you use and why?

947


What is difference between list and array list?

813


What is a vector class?

827


What is the height of binary tree?

948


How is any data structure application is classified among files?

1013


When will we get ArrayStoreException?

1128


Which collection type is used to maintain uniqueness of data structure?

1437


What is worst case complexity algorithm?

862