NeetCode #351LC-150MediumStackNC 150NC 250
← Back to All Problems

#351 · #150 · Evaluate Reverse Polish Notation(逆波兰表达式求值)

📌 Problem Statement & Constraints

You are given an array of strings tokens representing an arithmetic expression in Reverse Polish Notation. Evaluate it and return the integer result. Valid operators are +, -, * and /, and division truncates toward zero. Constraints: 1 <= tokens.length <= 10^4; the expression is always valid.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!