You are on page 1of 1

Infix- when the operator lies betwn operand.

A + B.

Prefix- when operator lies in extreme left


+AB

Postfix- when the operator lies in extreme right


AB+

Polish Notation - (1). To convert infix to postfix


(2). To solve postfix.

Operator Priorities:
?(conditional operator)- Highest priority(3).

*/ - second heightest

+- - least priority

( (open bracket) - No priority

Rules:

(1). Whenever u find open bracket ( push into the stack, and when close bracket
occurs ) pop from the stack.

(2). When the operator with high precidence occurs push it over the operator of low
precidence.

(3). If the operator of low precidence occur then pop the opearator of high
precidence and push the low.

(4). Do not push the operand inside the stack.

(5), if no bracket is found then give the bracket using BODMAS rule.

You might also like