Bubble Sort (OCR A-Level Computer Science): Quizzes

📚Quizzes
Bubble Sort
Sign up to keep practising.Create a free account to play more quizzes and track your progress.

Practise the questions

12 questions from this quiz

Show

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?

Stable

How much extra memory does Bubble Sort require?

Small, constant amount

What is the best case time complexity of Bubble Sort?

O(n)O(n)

What is the worst case time complexity of Bubble Sort?

O(n2)O(n^2)

When does Bubble Sort exhibit worst case O(n2)O(n^2) time complexity?

When list is sorted in reverse order

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 no swaps are needed

In the pseudocode, what is the range of the inner loop j?

0 TO n - i - 2

What completes one 'pass' in Bubble Sort?

Comparing pairs until end of list

What common mistake involves the range of inner loops?

Forgetting to decrease as sorted

Is Bubble Sort practical for large datasets?

No, it is not practical

Explore OCR A-Level Computer Science Revision Notes by Topics

Explore OCR A-Level Computer Science Model Answers by Topics

Explore OCR A-Level Computer Science Flashcards by Topics

Explore OCR A-Level Computer Science Exam Questions by Topics

Join 100,000+ A-Level students studying Quizzes with us.

Select your subjects, and get access to A+ resources today.