Infosys Interview Question

Asked me to write code for bubble sort and explain it.