Longest Same-Speed Segment After k Removals

Asked at Amazon · Coding Questions · Difficulty: Medium

Given `speed` and integer `k`, after removing at most `k` racers, return the maximum number of racers in a contiguous segment that all share the same speed.

Loading the problem…