The Postfix Processor
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L4
Problem
Given a list of string tokens forming a valid postfix (RPN) expression supporting integers and operators '+', '-', '*', '/', evaluate it. Use integer-truncation-toward-zero division for '/'. Return the integer result.
Summary
Math without parentheses - the operators come after the numbers.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.