CAPE Computer Science Unit 2 · 2013 · Paper 2 · Question 2(a)(iii)
Given a C function `bubbleSort(int a[], int numItems)` implementing bubble sort on an array of integers.
State why the upper limit for j in the inner 'for' loop is (numItems - i) rather than (numItems).
The mark scheme is shown once you've answered.
Practise this question