Docker·Software Engineer·Technical Phone Screen
May 2026
Interviewed for a software engineer role at Docker and got a calculator problem that looks easy until you remember operator precedence is a thing. No parentheses at least, but still had to think carefully about how to handle multiplication and division before addition and subtraction.
- Given a string representing a valid mathematical expression with non-negative integers and the operators +, -, *, and /, evaluate it and return the result. Integer division should truncate toward zero. No parentheses, no built-in eval.
“My first instinct was to just scan left to right and accumulate, which obviously breaks the moment you hit a * or /.”