Help needed! (Code Review)

I am trying to solve to question
“Compilers and parsers” using stacks.
(problem code: COMPILER).

I tried debugging my code with several test cases but I am getting WA.

Please can anyone review my code?

if at the end temp \; != 0 is not true that answer is 0, there could have been a prefix where temp was 0

1 Like

Thanks for the review. Found out the mistake :slight_smile: