Evaluate a string arithmetic expression containing non-negative integers, '+', '-', '*', '/', parentheses '(', ')', and spaces. Respect operator precedence and associativity, support unary minus, and perform integer division truncating toward zero. Return the 64-bit integer result or an error for invalid inputs (e.g., mismatched parentheses). Describe and implement your approach (e.g., two-stack method or shunting-yard) and analyze time/space complexity.