You should see a 'bubble-like' animation if you imagine the larger items 'bubble up' (actually 'float to the right side of the array').
Given an array of N elements, Bubble Sort will:
- Compare a pair of adjacent items (a, b),
- Swap that pair if the items are out of order (in this case a > b),
- Repeat Step 1 and 2 until we reach the end of array
- By now, the largest item will be at the last position.
- We then reduce N by 1 and repeat Step 1 until we have N = 1.