Easy c++ solution using sliding window.
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    int find(int s,int e,string &word,int k){
        int cnt=0;
        int n=word.size();
        for(int i=1;i<=26 && i*k<=e-s+1;i++){
            vector<int>freq(26,0);
            int good=0;
            int l=s,r=s;
            int len=i*k;
            while(r<=e){
                char ch=word[r];
                freq[ch-'a']++;
                    if(freq[ch-'a']==k){
                        good++;
                    }
                    else if(freq[ch-'a']>k){
                        good--;
                    }
                    if(r-l+1>len){
                        if(freq[word[l]-'a']==k)
                        good--;
                        else if(freq[word[l]-'a']>k){
                            good++;
                        }
                        freq[word[l]-'a']--;
                        l++;
                    }
                    if(good==i){
                        cnt++;
                    }
                r++;
            }
        }
        return cnt;
    }
    int countCompleteSubstrings(string word, int k) {
        int n=word.size();
        int res=0;
        int last=0;
        for(int i=1;i<=n;i++){
            if(i==n || abs(word[i]-word[i-1])>2){
                res+=find(last,i-1,word,k);
                last=i;
            }
        }
        return res;
    }
};
```
['C++']