Issue in the code

testcases are not passing ???

Hey @gargshivam2001 , The code you wrote is absolutely correct just instead of initializing nsp = n initialize nsp =2*n-1 , it does not have anything to do with the logic of the code just the orientation will then be same as the outputs .
Hope it helps ! Happy Coding! :blush:

Here is the updated code @gargshivam2001