0% found this document useful (0 votes)
314 views1 page

Examples of Infix-to-Postfix Conversion

This document provides examples of converting infix expressions to postfix notation. It shows the step-by-step conversion of two infix expressions to postfix strings and illustrates the contents of the operator stack at each step. Postfix notation, also known as Reverse Polish Notation (RPN), writes the operators after their operands.

Uploaded by

VAN BECKER
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
314 views1 page

Examples of Infix-to-Postfix Conversion

This document provides examples of converting infix expressions to postfix notation. It shows the step-by-step conversion of two infix expressions to postfix strings and illustrates the contents of the operator stack at each step. Postfix notation, also known as Reverse Polish Notation (RPN), writes the operators after their operands.

Uploaded by

VAN BECKER
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

CSCI 270 Infix expression: Token a + b * c d / e * f

Examples of Infix-to-Postfix Conversion a+b*c-d/e*f postfix string a ab abc abc* abc*+ abc*+d abc*+de abc*+de/ abc*+de/f abc*+de/f* abc*+de/f*-

operator stack top # #+ #+* #+ # ##-/ ##-* ##

Infix expression: Token ( a + b * c d ) / ( e * f )

(a+b*c-d)/(e*f) postfix string a ab abc abc* abc*+ abc*+d abc*+dabc*+d-e abc*+d-ef abc*+d-ef* abc*+d-ef*/

operator stack top # #( #(+ #(+* #(+ #( #(# #/ #/( #/(* #/( #/ #

You might also like