Find the length of the longest stretch of a string in which no character appears twice — then think about what changes when some repeats are allowed.
Find the length of the longest stretch of a string in which no character appears twice — then think about what changes when some repeats are allowed.
The discussion opens with the full question.