Problem in debugging cooking game problem?

I am facing some problem in debugging my code for cooking game problem from feb cook off. I need help in debugging my code for this problem.

@arpit728, you have missed the corner case where a[0]=-1. There are no other bugs :slight_smile:

@meooow
Thanks.