Compilers and Parsers
Where am I getting it wrong??Someone do help,plzzzz

This is not submission link

That’s a submission link and not your solution. I believe this is your submission.

I’m attaching my solution. I think it’s self explanatory.

[UPD]: The problem with your code is m+=2. Either do a m++ when you push a ‘<’ into the stack, or simply relate the length with the value of i. (maxl = i + 1).

1 Like