Can you please tell me WHY my code aint passing any test cases?
correct code
why uur code is wrong

i+1 might go out of bound u need to check if i+1 < n
correct code
why uur code is wrong

i+1 might go out of bound u need to check if i+1 < n