Maximum Length Substring With Two Occurrences
Extend a window one letter at a time and shrink from the left whenever a letter appears a third time; the widest valid window wins.
Extend a window one letter at a time and shrink from the left whenever a letter appears a third time; the widest valid window wins.