For two testcases it runs perfectly, i cant find the mistake
What is wrong in my code?
hi @anushreemahur5 you can refer to this tutorial https://www.youtube.com/watch?v=MhQPpAoZbMc of the problem. Please save your code on ide.codingblocks.com and share the link for future reference.
the ide is empty
please share valid CB ide link
use long long int instead of int
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
What is wrong in my code ? Please clarify
i used long long int also , still doesnt passes the testcases
Hello @anushreemahur5,
There are two mistakes in the code you have implemented.
-
the product can result in a value larger than the range of int.
-
Each index should be pushed at least once into the stack.
Refer to the following code for your mistakes:
Hope, this would help.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.