Execute algorithm to convert infix into post fix expression, Data Structure & Algorithms

Assignment Help:

Q. Execute your algorithm to convert the infix expression to the post fix expression with the given infix expression as input

Q = [(A + B)/(C + D) ↑ (E / F)]+ (G + H)/ I

 

Ans:

The given infix expression is as follows:-

Q = [(A + B) / (C + D) ^ (E + F)] + (G + H) / I

Symb               Stack                           Postfix Notation

[                    [

(                    [ (

A                  [ (                          A

+

[ ( +

 

B

[ ( +

AB

)

[

AB+

/

[ /

 

(

[ / (

 

C

[ / (

AB+C

+

[ / ( +

 

D

[ / ( +

AB+CD

)

[ /

AB+CD+

^

[ / ^

 

(

[ / ^ (

 

E

[ / ^ (

AB+CD+

/

[ / ^ ( /

AB+CD+

F

[ / ^

AB+CD+/

]

EMPTY

AB+CD+EF/^/

+

+

 

(

+ (

 

G

+ (

AB+CD+EF/^/G

+

+ ( +

 

H

+ ( +

AB+CD+EF/^/GH

)

+

AB+CD+EF/^/GH+

/

+ /

AB+CD+EF/^/GH+

I

+ /

AB+CD+EF/^/GH+I

POSTFIX is:-       AB+CD+EF/^/GH+I/+


Related Discussions:- Execute algorithm to convert infix into post fix expression

Prime''z algorithem, Ask question #explain it beriflyMinimum 100 words acce...

Ask question #explain it beriflyMinimum 100 words accepted#

Program insertion of a node into any circular linked list, Program Insertio...

Program Insertion of a node into any Circular Linked List Figure depicts a Circular linked list from which an element was deleted. ALGORITHM (Deletion of an element from a

Tree Traversal, If preorder traversal and post order traversal is given the...

If preorder traversal and post order traversal is given then how to calculate the pre order traversal. Please illustrate step by step process

Algorithm, give me algorithm of simple interest

give me algorithm of simple interest

Addressing modes, Compare zero-address, one-address, two-address, and three...

Compare zero-address, one-address, two-address, and three-address machines by writing programs to compute: Y = (A – B X C) / (D + E X F) for each of the four machines. The inst

A sort which relatively passes by a list, A Sort which relatively passes by...

A Sort which relatively passes by a list to exchange the first element with any element less than it and then repeats with a new first element is called as      Quick sort.

How do you rotate a binary tree, How do you rotate a Binary Tree?  Rot...

How do you rotate a Binary Tree?  Rotations in the tree: If after inserting a node in a Binary search tree, the balancing factor (height of left subtree - height of right

Which of the sorting algorithm is stable, Which of the sorting algorithm is...

Which of the sorting algorithm is stable   Heap sorting is stable.

Sequential files, Data records are stored in some particular sequence e.g.,...

Data records are stored in some particular sequence e.g., order of arrival value of key field etc. Records of sequential file cannot be randomly accessed i.e., to access the n th

Notes, Ask question #Minimum 10000 words accepted#

Ask question #Minimum 10000 words accepted#

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd