Cody

Solution 395391

Submitted on 1 Feb 2014
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
assert(isequal(balance_parens('(((()))((())))'),1))

The function balance is a built-in MATLAB function. Please use a different function name.

2   Fail
assert(isequal(balance_parens('(()()())'),1))

The function balance is a built-in MATLAB function. Please use a different function name.

3   Fail
assert(isequal(balance_parens(['(()()()()()()()()()()()())']),1))

The function balance is a built-in MATLAB function. Please use a different function name.

4   Fail
assert(isequal(balance_parens('(()()()))))'),0))

The function balance is a built-in MATLAB function. Please use a different function name.

5   Fail
assert(isequal(balance_parens('(()()(((((((((((()))))'),0))

The function balance is a built-in MATLAB function. Please use a different function name.

6   Fail
assert(isequal(balance_parens('))()())'),0))

The function balance is a built-in MATLAB function. Please use a different function name.

7   Fail
assert(isequal(balance_parens('(()()()()((()))()()()(((()))))'),1))

The function balance is a built-in MATLAB function. Please use a different function name.

8   Fail
assert(isequal(balance_parens('((((()))))'),1))

The function balance is a built-in MATLAB function. Please use a different function name.