[mypy] Fix type annotations for linked_stack.py, evaluate_postfix_notations.py, stack.py in data structures (#4409)
* [mypy] Fix type annotations for linked_stack.py, next_greater_element.py, stack.py * Reformatted files according to black
This commit is contained in:
committed by
GitHub
parent
727341e3db
commit
deb71167e7
@@ -1,3 +1,5 @@
|
||||
from typing import Any, List
|
||||
|
||||
"""
|
||||
The Reverse Polish Nation also known as Polish postfix notation
|
||||
or simply postfix notation.
|
||||
@@ -21,7 +23,7 @@ def evaluate_postfix(postfix_notation: list) -> int:
|
||||
return 0
|
||||
|
||||
operations = {"+", "-", "*", "/"}
|
||||
stack = []
|
||||
stack: List[Any] = []
|
||||
|
||||
for token in postfix_notation:
|
||||
if token in operations:
|
||||
|
||||
Reference in New Issue
Block a user