Bubble sort (Edexcel 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

Bubble sort definition

A sorting algorithm that compares adjacent items and swaps them if in wrong order

Why called 'bubble sort'?

Smaller elements 'bubble' to the top of the list

Ascending order meaning

Arranging items from smallest to largest

Descending order meaning

Arranging items from largest to smallest

Items compared in bubble sort

Adjacent (neighbouring) items

Name for one complete cycle through list

A pass

When bubble sort stops

When a full pass occurs with no swaps

Result after each pass

At least one element in correct final position

Element that bubbles up each pass

The largest element (in ascending order)

When to use bubble sort

Small datasets or for learning

Bubble sort speed

Not the fastest sorting algorithm

Orders bubble sort can do

Both ascending and descending order

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

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