IDEMIA interview question

Tell me Bubble Sort logic