Infix to postfix

Here is an infix expression: 4 + 3(63-12). Suppose that we are using the usual stack algorithm to convert the expression from infix to postfix notation. The maximum number of symbols that will appear on the stack AT ONE TIME during the conversion of this expression?

here th ans should be 3 as + will get into stack then ( then - and then as ‘)’ comes it will start popping so max elements stored in stack is 3 i.e “+ ( -”

yes , you are right what is the answer given

1 Like

the given ans is 4 i am not able to understand how 4 is answer??

the question is edited . take a look and reattempt it

1 Like

okay thank you for correcting the answer

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.