Recall & Review
beginner
What is a sorting algorithm?
A sorting algorithm is a step-by-step method used to arrange items in a list into a certain order, like from smallest to largest. Think of organizing books on a shelf by height.
Click to reveal answer
beginner
How does the Bubble Sort algorithm work?
Bubble Sort compares pairs of items next to each other and swaps them if they are in the wrong order. It repeats this process, like bubbles rising to the top, until the whole list is sorted.
Click to reveal answer
beginner
What is the main idea behind Selection Sort?
Selection Sort finds the smallest item in the list and swaps it with the first item. Then it finds the next smallest and swaps it with the second item, and so on, like picking the smallest apples one by one.
Click to reveal answer
intermediate
Which sorting algorithm is generally faster for small lists: Bubble Sort or Selection Sort?
Selection Sort is usually faster than Bubble Sort for small lists because it makes fewer swaps, even though both check all items multiple times.
Click to reveal answer
beginner
What is a real-life analogy for Bubble Sort?
Imagine sorting a line of kids by height by repeatedly swapping neighbors who are out of order. The tallest kids 'bubble' to the end of the line after several passes.
Click to reveal answer
What does Bubble Sort do when it finds two items in the wrong order?
✗ Incorrect
Bubble Sort swaps two items if they are in the wrong order to move larger items towards the end.
In Selection Sort, what is selected during each pass?
✗ Incorrect
Selection Sort selects the smallest item in the unsorted part to place it in the correct position.
Which sorting algorithm repeatedly compares neighbors?
✗ Incorrect
Bubble Sort compares and swaps neighboring items repeatedly.
How many swaps does Selection Sort make in the worst case?
✗ Incorrect
Selection Sort makes one swap per pass after finding the smallest item.
Which sorting algorithm is easier to visualize as 'bubbles rising'?
✗ Incorrect
Bubble Sort is named for how larger items 'bubble' to the top (end) of the list.
Explain how Bubble Sort works using a real-life example.
Think about sorting kids by height in a line.
You got /4 concepts.
Describe the step-by-step process of Selection Sort with an analogy.
Imagine picking fruits one by one from a basket.
You got /4 concepts.