leetcode

340. Longest Substring with At Most K Distinct Characters

Solution description

Solution code

Time complexity: O(n)

**Space complexity: O( alphabet ) = O(1)**