Balanced paranthesis

all test cases are not passing

Input Format:
A string of β€˜(’ , β€˜)’ , β€˜{’ , β€˜}’ and β€˜[’ , β€˜]’ .
You are just considering β€˜(’ and β€˜)’ . Try with considering all these cases and then check your code.

i have done this using 3 stacks…is thhere any way of doing it with a single stack

It can be done using a single stack.
Refer this https://ide.codingblocks.com/s/257816

please check my code once

Yes…your approach is also correct.

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.