Save
...
computational thinking
mod3
bubble sort
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
emily d
Visit profile
Cards (26)
BUBBLE SORT
: A
sorting technique
that involves placing items in a list then ordering in order of alpherbet/number
Check if number in
position
0 is greater than the number in
position
1.
Check if the number in position 1 is greater than the number in position 2.
Continue checking whether each position is greater than the number in the position next to it until the you reach the end.
The number in the last position of the list has now been
sorted
.
Pass through the list as many times as required. This should be 1 less than the number of
values
in the list.
What sorting algorithm is being discussed?
Bubble sort
View source
What is the main action performed in bubble sort?
Comparing
and swapping
adjacent
items
View source
What happens to the highest number during bubble sort?
It
bubbles
to the right
View source
What forms at the end of the array during bubble sort?
A
sorted partition
View source
What is the result after completing the bubble sort algorithm?
The array is
sorted
View source
What is the pseudocode structure for bubble sort?
Nested
for-loop
Compare
adjacent
items
Swap if
out of order
Repeat until sorted
View source
What is the worst-case time complexity of bubble sort?
Big O
of
n
2
n^2
n
2
View source
What does
n
n
n
represent in the time complexity of bubble sort?
The size of the
array
View source
What should students do if they have questions about bubble sort?
Ask them below the
video
View source
What is the first step in the bubble sort process?
Compare
adjacent
items
View source
What does the term "iteration" refer to in bubble sort?
A complete pass through the
array
View source
How does bubble sort ensure that the highest number is in the correct position?
By repeatedly swapping
adjacent
out-of-order
items
View source
What does the bubble sort algorithm do?
It compares and swaps
items
in order
View source
When does the bubble sort algorithm swap items?
When they are in the
wrong order
View source
How does bubble sort start its process?
At the beginning of the
list
View source
What is the process of comparing items in bubble sort?
Compare each pair of
adjacent
items
Swap them if they are in the wrong order
Repeat until the entire
list
is sorted
View source
How many items does bubble sort compare in each iteration?
Each pair of
adjacent
items
View source
What happens if items are in the wrong order during bubble sort?
They are
swapped
to correct the order
View source
What is the stopping condition for bubble sort?
When no
swaps
are left to perform
View source
What is the final step in the bubble sort process?
All
swaps
are completed
View source
What does the notation "7.5 = 5.74" imply in the context of bubble sort?
It indicates a specific
comparison
or
swap
View source
What should you do if items are still in the wrong order after a pass in bubble sort?
Continue
repeating
the
process
View source
What is the significance of repeating until no swaps are left?
It ensures the list is fully
sorted
View source
What are the key steps in the bubble sort algorithm?
Start at the beginning of the list
Compare each pair of
adjacent
items
Swap if they are in the wrong order
Repeat until no swaps are needed
View source