5.Infix And Prefix and Postfix Conversions
Infix to Postfix
Input: str = "a+b*(c^d-e)^(f+g*h)-i"
Output: abcd^e-fgh*+^*+i-
Explanation :
After converting the infix expression
into postfix expression, the resultant
expression will be abcd^e-fgh*+^*+i-Input: str = "A*(B+C)/D"
Output : ABC+*D/
Explanation :
After converting the infix expression
into postfix expression, the resultant
expression will be ABC+*D/
Solution:
Last updated