Bubble Sort (AQA GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
12 cards from this deck
ShowHide
Practise the cards
12 cards from this deck
What bubble sort examines
What bubble sort examines
Pairs of adjacent elements
Action when elements in wrong order
Action when elements in wrong order
Swap them around
Why it's called 'bubble sort'
Why it's called 'bubble sort'
Largest numbers bubble to the top of the list
When does bubble sort stop?
When does bubble sort stop?
After a full pass with no swaps made
Type of comparisons bubble sort makes
Type of comparisons bubble sort makes
Adjacent elements only
How many passes bubble sort needs
How many passes bubble sort needs
Multiple passes through the data
Bubble sort efficiency for large lists
Bubble sort efficiency for large lists
Not the most efficient
Time complexity of bubble sort
Time complexity of bubble sort
First step of bubble sort
First step of bubble sort
Compare first two elements
Which elements reach position first?
Which elements reach position first?
Largest elements bubble up first
Outer loop condition in bubble sort
Outer loop condition in bubble sort
Repeats until no swaps made
Inner loop action in bubble sort
Inner loop action in bubble sort
Compare each adjacent pair and swap if needed
