Use a quick sort to rearrange the following letters into alphabetical order. You must indicate the pivot that you use at each pass.
P
B
M
N
J
K
R
D
(5 marks)
Find the maximum number of swaps needed to rearrange a list of 8 numbers into ascending order when using a bubble sort.
(1 mark)
A list of 8 numbers was rearranged into ascending order using a bubble sort. The maximum number of swaps was needed. What can be deduced about the original list of numbers?
(1 mark)