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


Please Help Members By Posting Answers For Below Questions

What is a hash in programming?

495


Why do we use linked lists?

483


What are the applications of linked list?

488


Is radix sort stable?

500


What are the types of binary tree?

501






In what areas do data structures are applied?

541


Are hash tables ordered?

479


What is the difference between hashset and arraylist?

489


What is a property class?

510


What do you mean by tree edge?

533


What are the difference between arraylist and linkedlist from the perspective of sorting?

555


What sorting algorithm does arrays sort use?

460


Which is better hashmap or treemap?

503


Is list an array?

444


What is data structures in computer science?

491