Infix to-postfix examples

38,987 views

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
38,987
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
283
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Infix to-postfix examples

  1. 1. Examples of Infix-to-Postfix Conversion Infix expression: a+b*c-d/e*f Token operator stack  top postfix string A a + + B ab * +* C ABC - + ABC* ABC*+ - D ABC*+d / -/ E ABC*+de * - ABC*+de/ -* F ABC*+de/f - ABC*+de/f* ABC*+de/f*- Infix expression: (a+b*c-d)/ (e*f) Token operator stack  top postfix string ( ( a a + (+ b ab * (+* c abc - (+ ABC* ( ABC*+ (- d abc*+d ) ABC*+d- / / ( /( e abc*+d-e * /(* f abc*+d-ef ) /( abc*+d-ef*
  2. 2. / ABC*+d-ef*/

×