Deep Dive: Parameters

Part of Bubble Sort · Section 5 of 9

Study NotesUnit: 3.1 Fundamentals of AlgorithmsGCSE

This study notes covers Deep Dive: Parameters within Bubble Sort for GCSE Computer Science. Revise Bubble Sort in 3.1 Fundamentals of Algorithms for GCSE Computer Science with 16 exam-style questions and 10 flashcards. This topic appears regularly enough that it should still be part of a steady revision cycle. It is section 5 of 9 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.

Deep Dive: Parameters

Parameters are the inputs a subprogram receives:

function calculateArea(length, width)
    area = length * width
    return area
endfunction

// Calling with arguments:
result = calculateArea(5, 3)  // result = 15

Arguments are the actual values passed when calling (5 and 3 above)

Parameters are the variable names in the definition (length and width)

Practice questions for Bubble Sort

Which of the following best describes bubble sort?

  • A. It selects the smallest element and moves it to the front each pass
  • B. It compares adjacent elements and swaps them if they are in the wrong order
  • C. It divides the list in half repeatedly until each half is sorted
  • D. It inserts each element into its correct position one at a time
1 markfoundation

Describe how bubble sort works. You should refer to what happens during each pass through the list. [3 marks]

3 marksstandard

Quick recall flashcards

How does bubble sort work?
Compare adjacent pairs, swap if wrong order, repeat passes
Why is it called bubble sort?
Largest values bubble up to the end like bubbles rising in water

16 questions on Bubble Sort — practise free

Instant marking, adaptive difficulty and spaced-repetition flashcards — all aligned to your exam board.

Start revising free →