Hello, I have tried to submit a solution for the following problem:-
PROBLEM
SOLUTION
Can someone please help and point out where and what I am doing wrong? It would be really helpful.
Hello, I have tried to submit a solution for the following problem:-
PROBLEM
SOLUTION
Instead of break use continue except last condition
You are getting WA because you didn’t check that crane already have a box or not before drop.
According to your code if 2 consicutive drop command occur this will increase stack with 2 which is wrong
Yes that might be the reason…I definitely didn’t think about that!!
Thanks.
Make a flag variable to check, crane already have a box or not