Year 10
Lesson details
Key learning points
- In this lesson, we will learn the first sorting algorithm in this unit: bubble sort. We will discuss why and where sorting is used in real life, become familiar with performing a bubble sort on a set of data, and investigate the efficiency of bubble sort.
Licence
This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.
Loading...
4 Questions
Q1.
The sequence of items in the list can either be ordered or unordered.
Binary Search
Q2.
If you double the number of items in the list, you will need at most one more comparison.
Linear Search
Q3.
The algorithm is simpler to write.
Binary Search
Q4.
What does the initial value of -1 indicate?
The item has been found.
3 Questions
Q1.
"If the item at the current position is greater than the one next to it, swap the items within the list"
False
Q2.
"A single pass results in the smallest element reaching its final position at the end of the list"
True
Q3.
"The number of comparisons made in a single pass is always equal to the number of pairs you pass over"
False