Problem 1341. Track Logic

A sensor produces either a hit (1) or a miss (0) for a given target once per scan. The sensor is also equiped with a tracker which uses the following logic: If a target is detected in 3 out of 8 scans, a track is started. If a target in track is not seen for 6 scans, the track is dropped. Write a function to give the track state (1 = in track, 0 = not in track) given an arbitrary array of hits and misses.

Solution Stats

40.48% Correct | 59.52% Incorrect
Last Solution submitted on Jul 03, 2020

Problem Comments