Get Max Racers

Problem Overview

  • Determine the maximum size of a contiguous group of racers with identical speed after removing at most k racers.
  • Input: speed[n], k; Output: integer max racers; Constraints: 1 ≤ n ≤ 3×10^5, 1 ≤ k ≤ n.
  • Context: HackerLand Sports Club forming a relay team with equal-speed contiguous racers for smooth baton transfer.
  • Source: This Amazon interviews problem is a common coding interview task and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: