Answer:
4 5 2 3 ^ / 4 - × 4 9 2 - × +
Explanation:
Start by putting a left parenthesis "(" on the operator stack, and adding a right parenthesis ")" to the end of the input expression.
Conversion algorithm
Copy any operands to the output string until an operator is encountered. Pop operators from the operator stack to the output string if they have equal or higher precedence, then put the operator encountered onto the operator stack. When a right parenthesis is encountered, pop operators from the operator stack to the output string until a left parenthesis is found. Drop that left parenthesis.
__
Given example
For the given expression, we copy 4 and 5 to the output, push / to the operator stack, copy 2 to the output, push ^ to the operator stack, and copy 3 to the output. At this point, the output is ...
4 5 2 3
and the operator stack is
( * ( / ^ . . . . . top item is on the right
When we encounter the - sign, we write the ^ and / operators to the output string and push - to the operator stack. At this point, the state is ...
output: 4 5 2 3 ^ / operator stack: ( * ( -
Next, we copy 4 to the output. When we encounter the right parenthesis, we copy - to the output and pop the ( from the operator stack.
The next input symbol, +, is lower precedence than the remaining * on the operator stack, so we output the * and push the +. Now we have ...
output: 4 5 2 3 ^ / 4 - * operator stack: ( +
The output string so far completes the evaluation of the first term of the input expression.
Now, we copy out 4, push * and (, copy out 9, push -, copy out 2. The right parenthesis triggers the popping of the - to the output, and the final right parenthesis that we added at the start pops the * and + from the operator stack. Our final output is ...
4 5 2 3 ^ / 4 - × 4 9 2 - × +
_____
The result is 14.5.