Maths topics › A level Further Maths › D1 and algorithms
Sort a list using a quick sort
A question
Free worksheet
10 questions on this objective, ready to print.
Download the worksheet (PDF)Worked solution
The working
- The list has \(n = 8\) items. The pivot is in position \(\dfrac{ 8 + 1}{ 2} = 4.5\), which rounds up to 5, so the first pivot is 43.
- For descending order, the items larger than the pivot are written before it. The items larger than 43, in their original order, are 46, 53, 84.
- So after the first pass there are 3 items before the pivot.
Mathster is maths homework, practice and assessment for schools, with animated worked solutions. Try Mathster free for 60 days →
Objectives from the AS and A level subject content for further mathematics (Department for Education). Contains public sector information licensed under the Open Government Licence v3.0.