Bubble Sort (OCR A-Level 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 repeatedly compare during execution?
What does Bubble Sort repeatedly compare during execution?
Adjacent elements in the list
Which property means Bubble Sort maintains the relative order of equal elements?
Which property means Bubble Sort maintains the relative order of equal elements?
Stable
How much extra memory does Bubble Sort require?
How much extra memory does Bubble Sort require?
Small, constant amount
What is the best case time complexity of Bubble Sort?
What is the best case time complexity of Bubble Sort?
What is the worst case time complexity of Bubble Sort?
What is the worst case time complexity of Bubble Sort?
When does Bubble Sort exhibit worst case time complexity?
When does Bubble Sort exhibit worst case time complexity?
When list is sorted in reverse order
What is the purpose of the 'swapped' flag in Bubble Sort?
What is the purpose of the 'swapped' flag in Bubble Sort?
Track if any swaps occurred in a pass
When should Bubble Sort stop making passes through the list?
When should Bubble Sort stop making passes through the list?
When no swaps are needed
In the pseudocode, what is the range of the inner loop j?
In the pseudocode, what is the range of the inner loop j?
0 TO n - i - 2
What completes one 'pass' in Bubble Sort?
What completes one 'pass' in Bubble Sort?
Comparing pairs until end of list
What common mistake involves the range of inner loops?
What common mistake involves the range of inner loops?
Forgetting to decrease as sorted
Is Bubble Sort practical for large datasets?
Is Bubble Sort practical for large datasets?
No, it is not practical
