Question discussion

Which of the sorting algorithm has the worst case time complexity of n log n ?

2873Medium DSSSB TGT Computer Science 0 replies 1 views
0

Which of the sorting algorithm has the worst case time complexity of n log n ?

  • AHeap sort
  • BQuick sort
  • CInsertion sort
  • DSelection sort
Correct answer: A

Explanation

Heap sort is O(n log n) in the worst case; quick sort is O(n^2), insertion and selection sort are O(n^2).

Discussion 0

Nobody has replied yet. Start the discussion!