Added n-pairs parentheses challenge

This commit is contained in:
=
2015-08-05 20:53:24 +05:30
parent b109b6f8cc
commit 30158749c9
3 changed files with 341 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
from nose.tools import assert_equal
class TestPairParentheses(object):
def test_pair_parentheses(self, solution):
assert_equal(solution(0), set([]))
assert_equal(solution(1), set(['()']))
assert_equal(solution(2), set(['(())', '()()']))
assert_equal(solution(3), set(['((()))','(()())', '(())()', '()(())', '()()()']))
print('Success: test_pair_parentheses')
def main():
test = TestPairParentheses()
test.test_pair_parentheses(pair_parentheses)
if __name__ == '__main__':
main()