Given a string text, determine the length of the longest substring that contains no more than 2 different characters.
Example 1: Input: "abaccc" Output: 4 Explanation: The answer is "accc", which has length 4.
Example 2: Input: "bbaaac" Output: 5 Explanation: The answer is "bbaaa", which has length 5.
Example 3: Input: "deeeeef" Output: 6 Explanation: The answer is "eeeeef", which has length 6.