Problem 1303. Is the paranthesis sequence balanced ?
Solution Stats
Problem Comments
-
11 Comments
Can anyone kindly check and fix the test suite. It appears that the function name 'balance' already exists on Cody. Thanks.
Error using balance:
First argument must be single or double.
This problem should either be corrected or removed from the String II series as the function name 'balance' already exists on Cody server. Hence, the String II badge can no longer be earned. Really discouraging...
Kindly correct the test suite.
Can anyone kindly check and fix the test suite. It appears that the function name 'balance' already exists on Cody. Thanks. Error using balance: First argument must be single or double.
I think this dude's "anyone" probably means you: @goc3 :)
@Bainhome, Thanks for the clarity. :)
Thanks for the tag, @bainhome. This problem has been fixed so that it is now solvable again.
This problem needs more test cases. For instance, ')(' is not balanced, and it would break a lot of "solutions".
Similar to Problem 80
Test 4 doesn't work
@Robert what's wrong with test 4? ")(" isn't balanced - it's closing a parenthesis when none's open.
Solution Comments
Show commentsProblem Recent Solvers171
Suggested Problems
-
Make an awesome ramp for a tiny motorcycle stuntman
653 Solvers
-
Determine if input is a perfect number
237 Solvers
-
Count letters occurence in text, specific to words with a given length.
165 Solvers
-
Sum of first n positive integers
581 Solvers
-
Sum the 'edge' values of a matrix
346 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!