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

Tree, tree is graph or not

tree is graph or not

Binary search, Explain binary search with an example

Explain binary search with an example

ALGORITHMS, WRITE AN ALGORITHM TO READ TWO NUMBERS AND PRINT THE LOWER VALU...

WRITE AN ALGORITHM TO READ TWO NUMBERS AND PRINT THE LOWER VALUE

Adjacency matrix of an undirected graph, 1) What will call a graph that hav...

1) What will call a graph that have no cycle? 2) Adjacency matrix of an undirected graph is------------- on main diagonal. 3) Represent the following graphs by adjacency matr

Explain in brief about the container, Explain in brief about the Container ...

Explain in brief about the Container An entity which holds finitely many other entities. Just as containers such as boxes, baskets, bags, pails, cans, drawers, and so for

Determine the complexity, 1)    The set of the algorithms whose order is O ...

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:

If-then-else statements, In this example, suppose the statements are simple...

In this example, suppose the statements are simple unless illustrious otherwise. if-then-else statements if (cond) { sequence of statements 1 } else { sequence of st

Abstract data type-stack, Conceptually, the stack abstract data type mimics...

Conceptually, the stack abstract data type mimics the information kept into a pile on a desk. Informally, first we consider a material on a desk, where we might keep separate stack

Define min-heap, Define min-heap A min-heap is a complete binary tree i...

Define min-heap A min-heap is a complete binary tree in which each element is less than or equal to its children. All the principal properties of heaps remain valid for min-hea

Sort the Sequence Using Merge Sort, Q. Sort the sequence written below of k...

Q. Sort the sequence written below of keys using merge sort. 66, 77, 11, 88, 99, 22, 33, 44, 55                                                                      Ans:

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