Quantcast interview question

Longest Substring with up to 2 repeating characters.