Update data_structures/stacks/infix_to_postfix_conversion.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
This commit is contained in:
AmirSoroush 2023-07-31 23:07:22 +03:00 committed by GitHub
parent 78e9dc4c7a
commit 5b760f06f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ def infix_to_postfix(expression_str: str) -> str:
break break
if char_precedence < tos_precedence: if char_precedence < tos_precedence:
postfix.append(stack.pop()) postfix.append(stack.pop())
break continue
# Precedences are equal # Precedences are equal
if associativity(char) == "RL": if associativity(char) == "RL":
stack.push(char) stack.push(char)