Bubble sort (Edexcel GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
12 cards from this deck
ShowHide
Practise the cards
12 cards from this deck
Bubble sort definition
Bubble sort definition
A sorting algorithm that compares adjacent items and swaps them if in wrong order
Why called 'bubble sort'?
Why called 'bubble sort'?
Smaller elements 'bubble' to the top of the list
Ascending order meaning
Ascending order meaning
Arranging items from smallest to largest
Descending order meaning
Descending order meaning
Arranging items from largest to smallest
Items compared in bubble sort
Items compared in bubble sort
Adjacent (neighbouring) items
Name for one complete cycle through list
Name for one complete cycle through list
A pass
When bubble sort stops
When bubble sort stops
When a full pass occurs with no swaps
Result after each pass
Result after each pass
At least one element in correct final position
Element that bubbles up each pass
Element that bubbles up each pass
The largest element (in ascending order)
When to use bubble sort
When to use bubble sort
Small datasets or for learning
Bubble sort speed
Bubble sort speed
Not the fastest sorting algorithm
Orders bubble sort can do
Orders bubble sort can do
Both ascending and descending order
