Coding
Longest Substring with Two Distinct Characters
Find the longest substring with at most two distinct characters.
Input: s = "ccaabbb"
Output: 5
Explanation: The substring "aabbb" contains exactly two distinct characters and has a maximum length of 5.
Was asked at