Problem 697 · Easy

Degree of an Array

Find the shortest contiguous slice that contains all the most frequent values. The visual records first and last positions for each value and compares spans.

Open the interactive visualisation