Mental Model
Bubble sort repeatedly swaps adjacent items if they are in the wrong order, like bubbles rising to the surface.
Analogy: Imagine a row of kids holding numbered cards. Each round, pairs of neighbors compare cards and swap if the left card is bigger, so the biggest card 'bubbles' to the right end.
Index: 0 1 2 3 4 Array: [5]->[3]->[8]->[4]->[2]
