7Medium
0/1

An automated quality-control system records the thickness of seven glass panels in millimetres as follows:

| 8.1 | 1.2 | 5.4 | 9.3 | 2.7 | 6.5 | 3.8 |

A bubble sort is used to sort this list of measurements into ascending order.

State the number of swaps that will be made during the first pass of the algorithm.

[1]

Algorithms Questions

Practise Edexcel GCSE Computer Science Algorithms with exam-style questions for GCSE Computer Science. 100 questions covering Constructs for solving problems, Variables, constants and data structures, Arithmetic, relational and logical operators, Tracing algorithm output with trace tables, Types of error and correcting logic errors, Standard algorithms (sorts and searches), and Evaluating algorithm fitness and efficiency, matched to the Edexcel GCSE Computer Science (1CP2) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Algorithms Questions

  1. GCSE
  2. /Computer Science
  3. /Algorithms