mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Fix type annotations for stack.py (#5566)
This commit is contained in:
@@ -14,7 +14,7 @@ def balanced_parentheses(parentheses: str) -> bool:
|
||||
>>> balanced_parentheses("")
|
||||
True
|
||||
"""
|
||||
stack = Stack()
|
||||
stack: Stack[str] = Stack()
|
||||
bracket_pairs = {"(": ")", "[": "]", "{": "}"}
|
||||
for bracket in parentheses:
|
||||
if bracket in bracket_pairs:
|
||||
|
||||
Reference in New Issue
Block a user