how to pass the 4th test case
how to know why particular test case is failing
https://ide.codingblocks.com/s/51584
Manmohan loves patterns -1
Hi Pratik, there is no need of the condition i==n-1 in line no. 10.
I just removed it and the code works fine.
Check it out here https://ide.codingblocks.com/s/51605.
Answer the second question
You need to think of all the corner cases that your code might fail for. You might need to check the formatting of the code or modify the data types according to the constraints. Depends from question to question.
1 Like