Two Sigma·Data Scientist·Technical Phone Screen
Jul 2026
Two Sigma data scientist interview with a coding problem that looks like a simple palindrome question until you actually read the constraints. The O(n) requirement rules out the naive increment-and-check approach entirely, which I did not fully appreciate until I was already mid-explanation.
- Given a positive integer K, find the smallest palindrome strictly greater than K. Your solution must run in time proportional to the number of digits, not by incrementing one at a time.
“I started by thinking about mirroring the left half onto the right half, which gets you partway there.” The rest of the author's notes on Data Scientist interview at Two Sigma, Technical Phone Screen round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post