Challenges- Arrays -Wave print column wise question

After doing compilation and test it shows correct output but after submitting the code it shows all test cases are wrong.