1224. Maximum Equal Frequency
Description
**Input:** nums = [2,2,1,1,5,3,3,5]
**Output:** 7
**Explanation:** For the subarray [2,2,1,1,5,3,3] of length 7, if we remove nums[4]=5, we will get [2,2,1,1,3,3], so that each number will appear exactly twice.**Input:** nums = [1,1,1,2,2,2,3,3,3,4,4,4,5]
**Output:** 13**Input:** nums = [1,1,1,2,2,2]
**Output:** 5**Input:** nums = [10,2,8,9,3,8,1,5,2,3,7,6]
**Output:** 8ac
Last updated