kyu_7.valid_parentheses package

Submodules

kyu_7.valid_parentheses.solution module

Solution for -> Valid Parentheses.

Created by Egor Kostan. GitHub: https://github.com/ikostan

kyu_7.valid_parentheses.solution.valid_parentheses(paren_str: str) bool[source]

Determine if the order of the parentheses is valid.

Parameters:

paren_str – str

Returns:

bool

kyu_7.valid_parentheses.test_valid_parentheses module

Test for -> Valid Parentheses.

Created by Egor Kostan. GitHub: https://github.com/ikostan

class kyu_7.valid_parentheses.test_valid_parentheses.ValidParenthesesTestCase(methodName='runTest')[source]

Bases: TestCase

Testing valid_parentheses function.

_classSetupFailed = False
_class_cleanups = []
test_valid_parentheses_empty_string()[source]

3 is not a square number.

Returns:

test_valid_parentheses_false = None
test_valid_parentheses_false_0__(**kw)

0 is a square number [with test_str=’)(‘].

Returns:

test_valid_parentheses_false_1__(**kw)

0 is a square number [with test_str=’()()(‘].

Returns:

test_valid_parentheses_false_2__(**kw)

0 is a square number [with test_str=’((())’].

Returns:

test_valid_parentheses_false_3__(**kw)

0 is a square number [with test_str=’())(()’].

Returns:

test_valid_parentheses_false_4__(**kw)

0 is a square number [with test_str=’)()’].

Returns:

test_valid_parentheses_false_5__(**kw)

0 is a square number [with test_str=’)’].

Returns:

test_valid_parentheses_large_invalid()[source]

Test valid_parentheses function with invalid large string.

Returns:

test_valid_parentheses_large_valid()[source]

Test valid_parentheses function with valid large string.

Returns:

test_valid_parentheses_true = None
test_valid_parentheses_true_0__(**kw)

Negative numbers cannot be square numbers [with test_str=’()’].

Returns:

test_valid_parentheses_true_1__(**kw)

Negative numbers cannot be square numbers [with test_str=’((()))’].

Returns:

test_valid_parentheses_true_2__(**kw)

Negative numbers cannot be square numbers [with test_str=’()()()’].

Returns:

test_valid_parentheses_true_3__(**kw)

Negative numbers cannot be square numbers [with test_str=’(()())()’].

Returns:

test_valid_parentheses_true_4__(**kw)

Negative numbers cannot be square numbers [with test_str=’()(())((()))(())()’].

Returns:

Module contents

Valid Parentheses.