Longest Substring With At Most K Unique Characters
easy
1. You are given a string(str) and a number K. 2. You have to find the length of longest substring of the given string that contains at most K unique characters.
Constraints
1 <= length of string <= 10^5 1 <= K <= 26
Format
Input
A string A number
Output
A number representing the length of longest substring with at most K unique characters.
Example
Sample Input
aabcbcdbca
2
Sample Output
4
Question Video