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
Define union-by-weight?
an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].
What is stack explain with diagram?
What is the Insertion Sort Code?.
How to inverting a function in sort and searching?
What is precision?
Can nsarray contain nil?
How do you create a tree diagram?
What are arrays used for?
How does variable declaration affect memory allocation?
Does arraylist allow null values?
What type of memory allocation is referred for Linked lists?
What are the advantage of collection classes over arrays?
Write the disadvantages of separate chaining?
What is the impact of signed numbers on the memory?