However, a bubble sort continues until no swaps are made in a pass. During the third pass, no swaps occurred so now the sort knows that all items are in order.