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 / uma sankar pradhan

selection sort,quick sort,bubble sort
(all will take the same time and its time complexity is of
the order of n^2)
the time complexity for insertion sort when the list is
ordered from smaller to larger is O(n)
the time complexity for merge sort irrespective of the
order of the elements is O(nlogn)

Is This Answer Correct ?    17 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is heap sort adaptive?

801


List the data structures which are used in rdbms.

836


Write program for Quick sort ?

1055


Will this code give error if I try to add two heterogeneous elements in the arraylist? And why?

909


Explain the terms base case, recursive case, binding time, run-time stack and tail recursion.

845


What is the use of data structure?

888


Write a program to sum values of given array.

985


What is the difference between file structure and storage structure?

961


What is impact of signed numbers on the memory using data structures?

996


When ArrayIndexOutOfBoundsException occurs?

1088


What is ascending and descending order?

814


Which interfaces are implemented by hashmap?

930


Which is the simplest file structure? (a) Sequential (b) Indexed (c) Random (a) Sequential

1084


Can arraylist store primitives?

894


Can you tell me the differences between Array and ArrayList?

1009