Pattern Mountain - something missing in code

Something went wrong here.
Can you give me hint?

hello @omkarvp99

in line 15 use space >0 .

becuase we never know whether space will be 0 or not.
for example if initially space will be odd then every time we subtract 2 from it and it will never hit 0 , becuase odd - some muliple of 2 will always be odd.

1 Like

@aman212yadav,
got it.