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$ DS data-structures stack infix-prefix virtual-gate-test-series + – smartmeet asked Jan 18, 2017 • edited Apr 14, 2019 by Lakshman Bhaiya smartmeet 1.0k views answer comment Share Follow See 1 comment See all 1 1 comment reply smsubham commented Feb 8, 2018 reply Follow Share Refer this: https://stackoverflow.com/questions/17254080/infix-to-postfix-algorithm-that-takes-care-of-unary-operators 0 votes 0 votes Please log in or register to add a comment.
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. Roshan Pawar answered Jun 9, 2017 Roshan Pawar comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Consider that unary operator along with the operand to be a single operand,here consider -b=k,then solve naveen_168 answered Oct 6, 2020 naveen_168 comment Share Follow See all 0 reply Please log in or register to add a comment.