You are given an array and an integer k and an array of integers. You must find the length of longest contigous subarray where all integers are equal after removing at most k elements from the array.
Example
Input:
[1, -2, 1, 1, 3, 2, 1 ,-2] k = 3
Output: 4
Explanation:
Remove index 1 from original Array:
[1, 1, 1, 3, 2, 1, -1]
Remove index 4 from original Array:
[1, 1, 1, 2, 1, -1]
Remove index 5 from original Array:
[1, 1, 1, 1, -1]
4 because the subarray with the same number has length of 4.