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
Which is better hashset or treeset?
What are the major data structures used in the rdbms?
What is array and structure?
Which is better merge or quick sort?
Which programming language is best for data structures?
Why is arraylist not thread safe?
Explain implementation of deletion from a binary tree.
If you are given a choice to use either arraylist and linkedlist, which one would you use and why?
What is difference between list and array list?
What is a vector class?
What is the height of binary tree?
How is any data structure application is classified among files?
When will we get ArrayStoreException?
Which collection type is used to maintain uniqueness of data structure?
What is worst case complexity algorithm?