Algorithm · SoFi · Medium
Requirements Model a highway containing entry sensors, exit sensors, and checkpoints between them. Every location has a sensor that records each passing vehicle. The supplied records are ordered chronologically and contain a timestamp, sensor identifier, and car identifier. Part 1: Review the provided implementation and its tests, identify why one test fails, and correct the defect. Part 2: Implement a function that returns the number of journeys represented by a portion of…
Checking your access…