Domanda di colloquio di Capgemini

How does the bubble sort work. Write down the code