Cody

Solution 1603665

Submitted on 8 Aug 2018 by Srishti Saha
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   Pass
assert(isequal(balance_parens('(((()))((())))'),1))

ans = 1

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

ans = 1

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

ans = 1

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

ans = 0

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

ans = 0

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

ans = 0

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

ans = 1

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

ans = 1