Data Scientist • Intern
Data Scientist • Intern
High QualityInterview Summary
My assessment started with a coding problem about querying a piecewise linear curve, then moved into prediction and regression. I had to select three nearby towns whose temperatures would help predict New York City’s temperature. The final question asked me to fit a regression line twice: once from a complete dataset and once as observations arrived, without keeping the earlier pairs.
Interview Details
Question 1 — Interpolate Between Points and Extrapolate at Both Ends
I received an unsorted list of points with distinct x-coordinates. Connecting them from left to right defined the curve, and I had to implement a function that could answer many queries efficiently. For a query outside the observed range, the function had to continue the line through the nearest two endpoints on that side.
The example used the points (7, 11), (1, 3), and (4, 5). The four queries covered interpolation, an exact match, and extrapolation in both directions.
| Query x | Expected y | Segment used |
|---|---|---|
| 0 | 7/3 | Extend the line from (1, 3) to (4, 5) to the left |
| 3 | 13/3 |
Unlock Full Details
Create a free account to unlock this interview experience report.