Intuition
Bubble Sort takes in a list of values and sorts them from lowest to highest. It does this in two steps:
- loop through each position from left to right. Per position:
if the value at the current one is greater than the next, swap the values.
- If at least one swap occurred during step one repeat the entire procedure, otherwise the list is sorted.