arraysquestions
What invariant do you use for a sliding window?
Anonymous
for a longest-substring window with no repeated characters, keep the current window free of duplicates. After adding a character, shrink from the left until that invariant holds again. What invariant helps with a different sliding-window problem?
0