Frequency Balance Subarray
Find the longest window that either repeats one value or whose distinct values come in exactly two frequency levels, one double the other.
Find the longest window that either repeats one value or whose distinct values come in exactly two frequency levels, one double the other.