Domanda di colloquio di John Deere

Can you tell me how does the bubble sort method work?