Skip to content

Latest commit

 

History

History
 
 

day40

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

cover

Day 40 - Prerfix, Infix, Postfix Conversion

Infix Expression: The expression of the form a op b. When an operator is in-between every pair of operands.

Example: ( (A * B) + (C / D) )

Prefix Operation: An expression is called the prefix expression if the operator appears in the expression before the operands. Simply of the form (operator operand1 operand2)

Example: (+ (* A B) (/ C D) )

Postfix Expression: The expression of the form a b op. When an operator is followed for every pair of operands.

Example: ( (A B *) (C D /) +)

Question 1

Convert an Infix Expression to a Postfix Expression

Hint: https://www.geeksforgeeks.org/stack-set-2-infix-to-postfix/

Question 2

Convert an Infix Expression to a Prefix Expression

Hint: https://www.geeksforgeeks.org/infix-to-prefix-conversion-using-two-stacks/

Question 3

Convert an Postfix Expression to a Infix Expression

HINT: https://www.geeksforgeeks.org/postfix-to-infix/

Solution to Question 1

// To Be Added

Solution to Question 2

// To Be Added

Solution to Question 3

// To Be Added