edited by
1,020 views
1 votes
1 votes
What we can do if the unary operator comes in infix notation while converting it into postfix/prefix notations? For example, this

     $a = -b+c*d/e+f↑g↑h-i*j$
edited by

2 Answers

0 votes
0 votes

Correct answer is : ab-cd*e/+fgh↑↑+ij*-=    (same as yours.)

Use <Left to Right> scanning, 1 stack and 1 output array.

Using same method as conversion of infix to postfix.

0 votes
0 votes
Consider that unary operator along with the operand to be a single operand,here consider -b=k,then solve

Related questions

2 votes
2 votes
3 answers
1
Tushar Shinde asked Jan 28, 2016
3,687 views
Consider the following expression with infix notationA * B - (C + D) * (E / 5) ^ F What is the maximum height of the operator stack during conversion from infix to postfi...
2 votes
2 votes
2 answers
2
jatin khachane 1 asked Dec 1, 2018
1,276 views
My doubt : What should we consider ^ operator as Bitwise XOR ? or Exponentiation
2 votes
2 votes
0 answers
3
2 votes
2 votes
2 answers
4
Amit puri asked Sep 29, 2016
2,728 views
Convert the infix to postfix and prefix expression1) log3! ^log4 *log log 6/7*4!2)log3!^sin 2*cos 3