AT&T·Data Scientist·Technical Phone Screen
May 2026
Technical screen for a Data Scientist role that somehow went deep into low-level integer arithmetic. Wasn't expecting to be asked to reimplement multiplication from scratch, let alone handle overflow saturation without 64-bit types. Weird round but genuinely interesting.
- Implement a multiply function for two integers without using the * or / operators. Must handle negatives, zero, INT_MIN * -1, and run in O(log n) time using a shift-and-add approach.
- After implementing the basic version, add overflow detection and saturate to INT_MAX or INT_MIN instead of wrapping, without using any 64-bit integer types.
- Walk through the time and space complexity of your implementation and argue why it's correct for all combinations of positive, negative, and zero inputs.
- What unit tests would you write to validate this function? Think about edge cases specifically.
- How would you extend this approach to big integer multiplication, and how does it compare to Karatsuba's algorithm?
- What changes in your implementation if the platform doesn't guarantee arithmetic right shift behavior?
“I started with naive repeated addition and they immediately asked me what the complexity was.”