Count M-length substrings occurring exactly K times in a string
Given a string S of length N and two integers M and K, the task is to count the number of substrings of length M occurring exactly K times in the string S. Examples: Input: S = "abacaba", M = 3, K = 2Output: 1Explanation: All distinct substrings of length 3 are "aba", "bac", "aca", "cab".Out of all