Given a string s, return the length of the longest substring that contains at most two distinct characters.
Input: A single string s.
Output: An integer — the length of the longest valid substring.
Input: eceba
Output: 3
Explanation: The longest substring with at most 2 distinct chars is 'ece' (length 3).Input: ccaabbb
Output: 5
Explanation: 'aabbb' has 2 distinct chars and length 5.Input: abc
Output: 2
Explanation: 'ab' or 'bc' both have length 2.0 <= s.length <= 5×10^4s consists of English letters