How Bubble Sort Works
Bubble sort repeatedly compares two neighboring values and swaps them if the left one is bigger. Each full pass from the start to the end of the array bubbles the largest remaining value to the right end. Repeating this pass as many times as there are elements leaves the whole array sorted.
In [5, 2, 8, 1, 9], does the first comparison, 5 and 2, trigger a swap?