Microsoft Interview Question

Given a string, find the longest sub-string that has at most 2 different characters in O(n) time complexity.