Back to the full dot-point answer
SingaporeComputer ScienceQuick questions
Algorithms and Problem Solving
Quick questions on Merge sort and quicksort explained: H2 Computing
5short Q&A pairs drawn directly from our worked dot-point answer. For full context and worked exam questions, read the parent dot-point page.
What is merge sort?Show answer
Merge sort splits the list in half, sorts each half recursively, then merges the two sorted halves:
What is quicksort?Show answer
Quicksort picks a pivot and partitions the list so smaller elements go left and larger go right; the pivot lands in its final place. It then recurses on each side:
What is q1?Show answer
State the time complexity of merge sort in the worst case and explain why it is the same as its average case. [2 marks]
What is q2?Show answer
What input causes quicksort's worst case with a first-element pivot? [1 mark]
What is q3?Show answer
Give one advantage of merge sort over quicksort. [1 mark]
Have a question we have not covered?
This dot-point answer is short enough that we have not extracted many short questions yet. Read the full dot-point answer or ask Mo, our study assistant, in the chat for follow ups.