Arrays- Bubble Sort

I am writing correct way to code but still some test case are failing . Can you please help me , Which test are failing.