Evaluate an Integer Arithmetic Expression

Given a valid arithmetic expression consisting of non-negative integers, operators +, -, *, /, parentheses ( and ), and spaces, evaluate and return its integer result.

Rules:

  • Parenthes...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: