Evaluate Reverse Polish Notation
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- medium
- Pro
You're given an arithmetic expression in reverse Polish notation, where each operator comes after its two operands, as a list of tokens that are numbers or the four basic operators. Work out its value and explain how a stack does it.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.