Bubble Sort (AQA GCSE Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
What does bubble sort examine in a list?
What does bubble sort examine in a list?
Pairs of adjacent elements
What does bubble sort do when two elements are in the wrong order?
What does bubble sort do when two elements are in the wrong order?
Swaps them around
Why is the algorithm called 'bubble sort'?
Why is the algorithm called 'bubble sort'?
Largest numbers bubble to the top
When does bubble sort stop running?
When does bubble sort stop running?
After a full pass with no swaps
What type of elements does bubble sort compare?
What type of elements does bubble sort compare?
Only adjacent elements
How many passes does bubble sort typically need?
How many passes does bubble sort typically need?
Several passes through the data
What is bubble sort's time complexity in the worst case?
What is bubble sort's time complexity in the worst case?
Is bubble sort efficient for large lists of data?
Is bubble sort efficient for large lists of data?
No, it's not the most efficient
What must happen even if the list appears sorted?
What must happen even if the list appears sorted?
One more full pass with no swaps
What does the outer loop in bubble sort pseudocode do?
What does the outer loop in bubble sort pseudocode do?
Runs until no swaps are needed
Which elements move to their correct positions first?
Which elements move to their correct positions first?
The largest elements
Is bubble sort guaranteed to terminate?
Is bubble sort guaranteed to terminate?
Yes, it always eventually stops
