Why in else if condition of code , s.top()!=')' is given in or statement ,tell me the test cases for which this part of or statement is working

why in else if condition of code , s.top()!=’)’ is given in or statement ,tell me the test cases for which this part of or statement is working

@shakul hey shakul the problem is simply tell you that if a sequence given like
{ [ ( ) ] }
you have to use stack to perform the task the first you have to push the { [ ( next time when this ) comes the current top element is ( then you have to pop and so on.