Capital One·Data Scientist·Technical Phone Screen
Jul 2026
Capital One data scientist interview that was basically a deep Python code review session. They handed me a broken snippet and wanted everything: bugs, fixes, tests, packaging, CI. More software engineering than I expected for a DS role.
- Walk through exactly what this Python function returns for a specific input, then identify every bug and code smell present in it.
- Rewrite this function as a correct, production-ready version with proper caching, and analyze its time and space complexity.
- Write pytest unit tests for this function covering edge cases like empty input, very large even numbers, negatives, None, and non-integer values.
- Show the exact shell commands to set up a virtual environment, pin dependencies, run tests, and build a wheel on macOS or Linux.
- How would you add CI with static type checking, linting, and coverage thresholds, and how would you expose this as a CLI entry point?
“The mutation-during-iteration thing I caught pretty fast, but I fumbled explaining the exact return value step by step.” The rest of the author's notes on Data Scientist interview at Capital One, 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