Tesla interview question

5. Interpolation function in C