Linear Search and Bubble Sort Algorithms

Linear search and bubble sort are two standard algorithms you need to know. You will learn how a linear search checks items one at a time to find a value, and how bubble sort puts data in order by repeatedly swapping neighbouring items.

Key terms

Linear search
Checks each item in turn until the value is found or the end of the list is reached. It is slow for large data sets.
Bubble sort
Sorts data by comparing adjacent values and swapping them if they are in the wrong order.
Pass
One complete run through the list. Bubble sort stops when a pass makes no swaps.

Part of Algorithm Design & Problem Solving.