An array of numbers is to be sorted into ascending order using a standard bubble sort algorithm:
[7, 3, 9, 1, 5]
State the number of swaps made during the first pass of this algorithm.
45 exam-style questions on Edexcel IGCSE Computer Science Algorithms. Each one has a worked solution and a mark scheme showing where the marks go.