Bubble sort problem

two test case fail i am not able to sort the test the test case.

@sudhanshu8917
Input :
4
2 2 -8 9

Expected Output :
-8 2 2 9

Your Output :
2 2 2 9

To correct this , stop printing the array in the sorting loop. Instead print the array in a seperate loop after the sorting is done.