algorithms.tutorialhorizon.com
Given a string, write an algorithm to find the longest substring with at most K characters. | Algorithms
Given a string, write an algorithm to find the longest substring with at most K characters.Example: Input: aabbaacdeeeeddded, K = 3 Output: Longest substring with 3 most unique characters is: cdeeeeddded with length 11 Input: abcddefabc, K = 4 Output: Longest substring with 4 most unique characters is: abcdd with length 5 Input: aaaabbbb, K = 4 Output: Not enough unique character is present in the input string