Quant Memo
Coding/●●●●●

Evaluate a postfix pricing formula

A pricing formula is given in postfix (reverse Polish) form: operands come first, then the operator acts on the two most recent values. Evaluate it.

tokens = ["3", "4", "+", "2", "*"]
-> 14.0      # (3 + 4) * 2

Return the numeric result of the postfix expression. Assume valid input with binary operators + - * /.

Your answer

This one is open-ended. Work it through, then check your reasoning against the full solution.

More Coding questions