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
What does it mean to sort an array?
What is difference between rb tree and avl tree?
What is sorting and its types?
What is comparator interface used for?
What does args stand for?
Is arraylist synchronized?
Is hashmap get thread safe?
What is the difference between Array and Arraylist?
What is difference between hashmap and hashset?
What’s the difference between enumeration and iterator interfaces?
Why is null not allowed in concurrenthashmap?
What is the heap in data structures?
Can arraylist be null?
What is data and data structure?
How does max heap work?