this easy version problem the difference version constraint array element you hack version problem solvedyou give array a_1 a_2 dot a_n your goal find length long subarray array frequent value unique in word look subarray frequent value occur f time subarray 2 different value occur exactly f timesan array c subarray array d c obtain d deletion possibly zero element begin possibly zero element end