Failing Testcases

Hi,
In Pattern Double Sided Arrow, i am failing several testcases, however few are passed. I have written a cluttered code, was thinking of improving it after passing all test cases. Please Help!

Hey @yashjain0112

Your code is very complex , but the problem is with spaces only.
Since u have written the code urself ,u will be better able to manipulate the variables for spaces
check for Inputs as 1,3,5,7 & 9
Make sure there are no starting spaces in middle row and rest follow the pattern according to question.

Yeps, figured it out!
scored full.
However i found, the editorial one more complex. i broke mine into functional units! Much more readable now

1 Like