Question discussion

Which sorting technique is best for sorting a linked list with n elements?

359255Medium DSSSB TGT Computer Science 0 replies 0 views
0
Which sorting technique is best for sorting a linked list with n elements?
  • AInsertion sort
  • BBubble sort
  • CMerge sort
  • DSelection sort
Correct answer: C

Explanation

Merge sort is best for linked lists because it needs no random access and runs in O(n log n).

Discussion 0

Nobody has replied yet. Start the discussion!