You don't need to read input or print anything. Your task is to complete the function substrCount() which takes the string S and an integer K as inputs and returns the number of substrings having exactly K distinct characters. Expected Time Complexity: O(|S|). Expected Auxiliary Space: ...
You don't need to read input or print anything. Your task is to complete the function substrCount() which takes the string S and an integer K as inputs and returns the number of substrings having exactly K distinct characters. Expected Time Complexity: O(|S|). Expected Auxiliary Space: ...