can someone explain me, why my test case 3 is not getting passed
Balanced paranthesis (test case-3 is not passing)
Firstly, include all of types of parentheses, since it is given in question as
A string of β(β , β)β , β{β , β}β and β[β , β]β .
Also in line 17, you need to check for this condition
if(ch==β)β)
{
if(!s.empty() && s.top()==β(β)
{
s.pop();
continue;
}
else
{
return false;
}
}
Also dont include the return statement, as the functionβs return type is void ,
refer to the changes in the code : https://ide.codingblocks.com/s/76833
i think, in my code i have considered all the things you have said. we can use return to stop the execution of that function at that point of time.In many codes, it has been used however,that is not the main problem.
can you please tell me the mistake in my code.
I have corrected your code, plz try to submit now
And if you find any confusion, plz let me know