Balanced parenthesis problem


This is showing st to be undeclared.please help.

hello @srshubhi398


u missed paranthesis

it should be st.top()

Still showing the same issue.

check this->https://ide.codingblocks.com/s/286441

declare ur stack out of loop

this code is compiling but it is giving the wrong answer.Would it give tle if i check all the cases separately?

check thi s->

1 Like

Thanks.But still 2 testcases are not being passed.

check this->

1 Like

Thankyou so much.I got my mistake.

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.