in DS edited by
1,001 views
1 vote
1 vote
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$
in DS edited by
1.0k views

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