[LeetCode 340] Longest Substring with At Most K Distinct Characters
Given a string, find the length of the longest substring T that contains at most k distinct characters.
For example, Given s = “eceba” and k = 2,
T is "ece" which its length is 3.
DiffcultyHard
Similar Problems
[LeetCode 159] Longest Substring with At Most Two Distinct Characters Hard