It’s not passing the first test case. but when I remove the (n==5) condition from ‘line 15’ in ‘if-condition’ then it passes the first test but fails the other two cases
Here’s the code:
Please help me figure out the error.
p.s. done without arrays