retagged by
404 views

1 Answer

0 votes
0 votes
$A+B*C/D+E$

$\implies A+(B*C)/D+E$

$\implies A+(BC*\ /D)+E$

$\implies (A+BC*D/)+E$

$\implies (ABC*/D+\ +E) $

$\implies ABC*/D+E+$

another way to solve this just by using an operator stack, An operator occurs in expression(left to write scanning) push into the stack, when a high priority operator comes in the stack n low priority operator already exists then push it, when a high priority operator already in stack and low priority comes then first pop the high priority operator from stack n then push another operator which have low priority n so on... doing this we get option b.
edited by
Answer:

Related questions

2 votes
2 votes
2 answers
2
0 votes
0 votes
2 answers
4
Arjun asked Oct 10, 2016
482 views
Which of the following permutation can be obtained in the output (in the same order) using a stack assuming that the input is the sequence $1, 2, 3, 4$ in that order?3, 4...