Bubble Sort (AQA GCSE Computer Science): Flashcards

📚Flashcards
Bubble Sort
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

12 cards from this deck

Show

What bubble sort examines

Pairs of adjacent elements

Action when elements in wrong order

Swap them around

Why it's called 'bubble sort'

Largest numbers bubble to the top of the list

When does bubble sort stop?

After a full pass with no swaps made

Type of comparisons bubble sort makes

Adjacent elements only

How many passes bubble sort needs

Multiple passes through the data

Bubble sort efficiency for large lists

Not the most efficient

Time complexity of bubble sort

O(n2)O(n^2)

First step of bubble sort

Compare first two elements

Which elements reach position first?

Largest elements bubble up first

Outer loop condition in bubble sort

Repeats until no swaps made

Inner loop action in bubble sort

Compare each adjacent pair and swap if needed

Explore AQA GCSE Computer Science Revision Notes by Topics

Explore AQA GCSE Computer Science Model Answers by Topics

Explore AQA GCSE Computer Science Quizzes by Topics

Explore AQA GCSE Computer Science Exam Questions by Topics

Join 100,000+ GCSE students studying Flashcards with us.

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