Basic calculator II

0
Remix

Evaluate a string expression of non-negative integers with +, -, *, / and spaces, no parentheses, respecting precedence (integer division truncates toward zero).

Variants reported: only + and *; do it without a stack in constant extra space by carrying the last term; and talk through how you would add parentheses.

MetaAmazonGleanTeslaCodingLast asked Sep 2026
No answer yet. Write the first one; the best answer gets endorsed.