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
INSERT FUNCTION /*prototypes of insert & find functions */ list * insert_list(list *); list * find(list *, int); /*definition of  anyinsert function */ list * inser

Determine the importance of array Arrays are significant since they allow many values to be stored in a single data structure whereas providing very fast access to each value.

Advantages of First in First out (FIFO) Costing Advantages claimed for first in first  out (FIFO)  costing method are: 1. Materials used are drawn from the cost record in

how to design a cache simulator with 4-way set associative cache

HOW LINKED LIST HEADER WORKS? HOW TO INSERT AND DELETE ELEMENTS IN LINKED LIST?

Acyclic Graphs In a directed graph a path is said to form a cycle is there exists a path (A,B,C,.....P) such that A = P. A graph is called acyclic graph if there is no cycle in

Enumerate about the carrier set members Ruby is written in C, so carrier set members (which is, individual symbols) are implemented as fixed-size arrays of characters (which is

implement multiple stacks in an array and write different algorithms to perform operations on it

The Ruby Programming Language Although data structures and algorithms we study aren't tied to any program or programming language, we need to write particular programs in speci

Question 1 Describe the following- Well known Sorting Algorithms Divide and Conquer Techniques Question 2 Describe in your own words the different asymptotic func