Balanced Parenthesis


What is wrong in this code it is giving wrong answer in testcase 4

@dsingh200021 Constraints: 1<=|S|<=10^5, so first increase the size of character array and then check. If still it gives wrong answer then let me know.

@dsingh200021 Also you are going wrong somewhere in the switch-case statements you have written in your code:
Consider the Input:
{)
Output should be β€œNo” but your code is giving β€œYes”.

Hope this helps. :slightly_smiling_face: