Skip to content

Commit 4a766c6

Browse files
1227harancclauss
andauthored
Add test cases to balanced_parentheses.py (#11870)
* Updated test cases * Apply suggestion from @cclauss --------- Co-authored-by: Christian Clauss <cclauss@me.com>
1 parent 499d398 commit 4a766c6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

data_structures/stacks/balanced_parentheses.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ def balanced_parentheses(parentheses: str) -> bool:
1111
False
1212
>>> balanced_parentheses("1+2*3-4")
1313
True
14+
>>> balanced_parentheses("{}")
15+
True
16+
>>> balanced_parentheses("))((")
17+
False
18+
>>> balanced_parentheses("((")
19+
False
1420
>>> balanced_parentheses("")
1521
True
1622
"""

0 commit comments

Comments
 (0)