So the question is to convert the following expression to postfix:
The answer I get when I calculate is:
But the answer is given to be
I assume that the step when you need to push second '^' into stack when there is already a '^' in the stack is where I went wrong (I pop out the '^' before pushing). Shouldn't we pop out the first '^' as they are of equal precedence ? Or is it an exception to '^' operator ?