- New graduate engineer
- Junior
- 20 min
Longest unchanged status run
North Quay records one integer status after each poll. Return the length of the longest contiguous run of equal statuses. The same status in separate runs doesn't join up. Return 0 for an empty log.
Skills and rubricContiguous run invariant
- Separates contiguous runs from total status frequencies.
- States the suffix invariant and updates the maximum on every poll.
- Runs an example and names one boundary result before calling the implementation complete.