159. Longest Substring with At Most Two Distinct Characters
Longest Substring with At Most Two Distinct Characters
Given a string, find the length of the longest substring T that contains at most 2 distinct characters.
For example,
Given s = “eceba”,
T is "ece" which its length is 3.
Solution
Previous158. Read N Characters Given Read4 II - Call multiple timesNext160. Intersection of Two Linked Lists
Last updated