Description
This algorithm works by iterating through each pair in the array and swapping them if they are in the wrong order.
The outer loop puts the current largest element into it's correct place at the end of the array.
The inner loop achieves this by doing the swapping.
Since the previous largest element will be in it's place, the inner loop only needs to iterate up to this.