2524. Maximum Frequency Score of a Subarray
ArrayHash TableMathStackSliding Window
Hints
Hint 1
Calculate the frequency score of each subarray of size k and return the maximum one.
Hint 2
Use the sliding window technique to keep the frequency scores.
Preparing judge…