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?

Answers were Sorted based on User's Feedback



A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

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

A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

Answer / zeeshan

quick sort is the answer.....quick sort shows worst case
behaviour when the list is already sorted....

courtesy"" shaum series- data structures""

Is This Answer Correct ?    15 Yes 0 No

A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

Answer / udkl

Its Quick Sort !!!!!
Even I got Surpriced!!!


http://www.geocities.com/siliconvalley/network/1854/Sort1.
html

Is This Answer Correct ?    13 Yes 4 No

A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

Answer / vinoth kumar.r

Quick sort's worst case is the one given in the question.
It exhibits selection sort type of procedure when the list
is sorted

Hence both :)

Is This Answer Correct ?    8 Yes 0 No

A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

Answer / neha gundecha

Its Quick Sort

Is This Answer Correct ?    3 Yes 0 No

A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

Answer / santosh

Quict Sort

Is This Answer Correct ?    2 Yes 0 No

A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

Answer / rahul

Bubble Sort cannot be the answer, Because the MODIFIED BUBBLE SORT takes complexity of O(n) when the elements are arranged in a particular order..

Is This Answer Correct ?    1 Yes 0 No

A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

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

A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

Answer / ntrphanikumar

I am not sure about the answer.

But I think the answer is "Selection Sort" whose order is
O(n^2) irrespective of the elements order.

I guess all other sorts somehow depend on the order of elements.

Is This Answer Correct ?    3 Yes 6 No

A list is ordered from smaller to largest when a sort is called. Which sort would take the longest ..

Answer / punit

selection sort.

Is This Answer Correct ?    3 Yes 7 No

Post New Answer

More Data Structures Interview Questions

What is data structure and data type?

0 Answers  


How does a binary search work?

0 Answers  


What data type is array?

0 Answers  


What is static array?

0 Answers  


Compare Queue and Topic ?

0 Answers   Tech Mahindra,


What is the difference between hashset and arraylist?

0 Answers  


In what scenario, binary search can be used?

0 Answers  


Sorting is not possible by using which of the following methods? (a) Insertion (b) Selection (c) Exchange (d) Deletion

1 Answers  


How does hashset maintain order?

0 Answers  


How would you sort words in a large file?

0 Answers   DELL,


What exactly is data?

0 Answers  


How to traverse data in a linked list in forward and backward direction, write the algorithm?

0 Answers  


Categories