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
Write an algorithm for compound interest.

what is alphanumerical code

Ask question #sdgsdgsdginimum 100 words accepted#

Data Structure and Methods: Build an array structure to accomodate at least 10 elements. Provide routines for the following: An initializer. A routine to populate (

Programming for hash table?

Algorithm for insertion of any element into the circular queue: Step-1: If "rear" of the queue is pointing at the last position then go to step-2 or else Step-3 Step-2: make

I am looking for some help with a data mining class with questions that are about neural networks and decision trees. Can you help? I can send document with questions.

Explain State Space Tree If it is convenient to execute backtracking by constructing a tree of choices being made, the tree is known as a state space tree. Its root indicates a

Which data structure is required to change infix notation to postfix notation?    Stack function is used to change infix notation to postfix notatio n

Illustrate Trivariate Colour Models Conventional colour models based on the tristimulus theory all contain three variables and so are called trivariate models. Let us now consi