Balanced parenthesis

not passing all the test cases ?? error in code