MSCI interview question

Sort array using bubble sort with two and one for loops.