Kata – Reverse Polish Notation

RPN is a notation used for representing mathematical expressions. It differs from the traditional and widely used infix notation in the order of operators and operands.

In infix notation the operator is placed between the operands, whereas in RPN, operands are placed first and the operator is located at the end. 

This is an expression written using infix notation:

3 + 4

The same expression written using RPN:

3 4 +

Get Test-Driven Java Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.