Qualcomm interview question

Sort a given array by Bubble Sort