Infix expression into the postfix expression, Data Structure & Algorithms

Q. Convert the given infix expression into the postfix expression (also Show the steps)

A ∗ (B + D)/ E - F(G + H / k )

Ans.

Steps showing Infix to Post fix

 

Symbol

Postfix String

Opstk

A

A

 

*

A

*

(

A

*(

B

AB

*(

+

AB

*(+

D

ABD

*(+

)

ABD+

*(

/

ABD+*

/

E

ABD+*E

/

-

ABD+*E/

-

F

ABD+*E/F

-

*

ABD+*E/F

-

(

ABD+*E/F

-(

G

ABD+*E/FG

-(

+

ABD+*E/FG

-(+

H

ABD+*E/FGH

-(+

/

ABD+*E/FGH

-(+/

K

ABD+*E/FGHK

-(+/

)

ABD+*E/FGHK/+-

 

Posted Date: 7/12/2012 8:40:05 AM | Location : United States







Related Discussions:- Infix expression into the postfix expression, Assignment Help, Ask Question on Infix expression into the postfix expression, Get Answer, Expert's Help, Infix expression into the postfix expression Discussions

Write discussion on Infix expression into the postfix expression
Your posts are moderated
Related Questions
what is tree

Suppose there are exactly five packet switches (Figure 4) between a sending host and a receiving host connected by a virtual circuit line (shown as dotted line in figure 4). The tr

1)    The set of the algorithms whose order is O (1) would run in the identical time.  True/False 2)    Determine the complexity of the following program into big O notation:

Normally a potential y satisfies y r = 0 and 0 ³ y w - c vw -y v . Given an integer K³0, define a K-potential to be an array y that satisfies yr = 0 and K ³ y w - c vw -y v

Example of Back Face Detection Method To illustrate the method, we shall start with the tetrahedron (pyramid) PQRS of     Figure with vertices P (1, 1, 2), Q (3, 2, 3), R (1,

How sparse matrix stored in the memory of a computer?

explain collision resloving techniques in hasing

Q. Give the algorithm to build a binary tree where the yields of preorder and post order traversal are given to us.

What is a Binary Search Tree (BST)? A binary search tree B is a binary tree every node of which satisfies the three conditions: 1.  The value of the left-subtree of 'x' is le

Determine the class invariants- Ruby Ruby has many predefined exceptions classes (like ArgumentError) and new ones can be created easily by sub-classing StandardError, so it's