The Gateway to Computer Science Excellence
+1 vote
526 views
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 | 526 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 (447 points)
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
50,650 questions
56,242 answers
194,294 comments
95,951 users