Problem Statement
Given a string of lowercase alphabets, count all possible substrings (not necessarily distinct) that have exactly k distinct characters.
Example:Input: S = "aba", K = 2Output: 3Explanation: The substrings are "ab", "ba", and "aba".
...