Maximum Comparisons or Swaps

A question is this type if and only if it asks for the maximum number of comparisons or swaps needed for a sorting algorithm on a list of n items, or what can be deduced from needing the maximum.

1 questions · Easy -1.2

Sort by: Default | Easiest first | Hardest first
AQA D1 2015 June Q3
5 marks Easy -1.2
3 Four students, \(A , B , C\) and \(D\), are using different algorithms to sort 16 numbers into ascending order.
  1. Student \(A\) uses the quicksort algorithm. State the number of comparisons on the first pass.
  2. Student \(B\) uses the Shell sort algorithm. State the number of comparisons on the first pass.
  3. Student \(C\) uses the shuttle sort algorithm. State the minimum number of comparisons on the final pass.
  4. Student \(D\) uses the bubble sort algorithm. Find the maximum total number of comparisons.