mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
Update data_structures/stacks/infix_to_postfix_conversion.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
This commit is contained in:
parent
78e9dc4c7a
commit
5b760f06f8
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user