</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

03

:

12

:

36

Get this deal
Back to Dashboard

Sensor Reading Interpolator

Easy

You are given a sorted list of sensor readings, where each reading is a pair [time, measurement]. The readings are sorted by time in ascending order. You are also given a step size.

For any two consecutive readings where the time gap exceeds the step size, insert intermediate readings using linear interpolation so that consecutive readings are exactly step time units apart. You are guaranteed that the time difference between any two consecutive input readings is divisible by step. ...