This question evaluates a candidate's ability to parse and evaluate arithmetic expressions using constant extra space, covering skills in string parsing, handling multi-digit numbers, operator precedence resolution, integer arithmetic semantics (including truncating division), and in-place algorithm design.

Given a string s representing a valid arithmetic expression containing non-negative integers, '+', '-', '*', '/', and spaces (no parentheses), evaluate and return its value. Implement a single-pass solution in O(n) time using O(