The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+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 by Active (4.8k points)
edited by | 517 views

1 Answer

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.

by (431 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,984 questions
55,135 answers
85,107 users