Company: Rippling_4sep
Difficulty: medium
Maximum Contiguous Racers with Same Speed Problem Description HackerLend Sports Club wants to send a team for a relay race. There are n racers indexed from 0 to n-1, each with a speed of speed[i] units. The coach wants to send a contiguous segment of racers with the same speed to ensure smooth baton transfer. To maximize the team size, the coach may remove at most k racers from the group. Given the array of racer speeds and an integer k, find the maximum possible number of racers in a contiguous segment with the same speed after removing at most k racers. Function Description Complete the function getMaxRacers in the editor with the following parameter(s): int speed[n] : the speeds of the racers int k : the maximum number of racers that can be removed Returns : int : the maximum number of racers that can be sent after removing at most k racers Examples Example 1: Input: n = 6 k = 2 speed = [1, 4, 4, 2, 2, 4] Output: 3 Explanation: The optimal strategy is to remove the two racers with s