Question: EXAMPLE : A +( B * C -( D / E - F ) * G )* H Stack Input Output Empty A+(B*C-(D/E-F)*G)*H - Empty

EXAMPLE: A+(B*C-(D/E-F) *G)*H

Stack

Input

Output

Empty

A+(B*C-(D/E-F)*G)*H

-

Empty

+(B*C-(D/E-F)*G)*H

A

+

(B*C-(D/E-F)*G)*H

A

+(

B*C-(D/E-F)*G)*H

A

+(

*C-(D/E-F)*G)*H

AB

+(*

C-(D/E-F)*G)*H

AB

+(*

-(D/E-F)*G)*H

ABC

+(-

(D/E-F)*G)*H

ABC*

+(-(

D/E-F)*G)*H

ABC*

+(-(

/E-F)*G)*H

ABC*D

+(-(/

E-F)*G)*H

ABC*D

+(-(/

-F)*G)*H

ABC*DE

+(-(-

F)*G)*H

ABC*DE/

+(-(-

F)*G)*H

ABC*DE/

+(-(-

)*G)*H

ABC*DE/F

+(-

*G)*H

ABC*DE/F-

+(-*

G)*H

ABC*DE/F-

+(-*

)*H

ABC*DE/F-G

+

*H

ABC*DE/F-G*-

+*

H

ABC*DE/F-G*-

+*

End

ABC*DE/F-G*-H

Empty

End

ABC*DE/F-G*-H*+

based on the example, convert Infix (Polish Notation) to Postfix(Reverse Polish Notation).

1. a + b * c + (d*e + f) * g

2. W = a + b * (c ** d -e) ** (f + g * h) i # ** is exponentiation

3. (-b + (b**2 4 * a * c) ** 0.5) / (2 * a) # ** is exponentiation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!