s
and store it in maxUnique
.maxUnique
using a variable currUnique
to represent the number of unique characters allowed in the window.windowStart
and windowEnd
, to represent the sliding window.currUnique
, and shrinking it otherwise.k
frequency with countAtLeastK
.k
frequency.