Explain how a stack could be used in the process of evaluating an expression in Reverse Polish notation.

Starting at the left hand side of the expression push values onto stack. Each time operator reached in the expression pop the top two values off the stack and apply the operator to them, then push the new value back onto the stack. When the end of the expression is reached the final value on the stack is the final result.

EF

Related Computing A Level answers

All answers ▸

Given a graph with n nodes and m edges, every edge has a passing cost that can be negative, find the minimum distance between node 1 and every other node


What are the main differences between different loops when it comes to coding ?


Describe the difference between a CPU and a GPU with relation to processing power and ability to perform tasks.


What is the range of denary numbers that can be represented using 8-bit two’s complement binary integers?