Pratik Shahpratik676.hashnode.dev·Aug 26, 2024Count Substrings with Exactly k Distinct Characters in a StringProblem 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". ...20 likes·56 readsSubstrings