C++ || Sliding Window || [ (k*26) -> main observation ]
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\nlong long int solve(string &s ,int k)\n{\n\n     long long int n=s.size();\n    int cnt=0;\n    for(int i=1; i<=26; i++)\n    {\n       long long int p=i*k;\n        if(p<=s.size())\n        {\n            map<char,int>mp;\n            for(int i=0; i<min(p,n); i++)\n            {\n                mp[s[i]]++;\n            }\n            int ff=0;\n            for(auto it:mp)\n            {\n                if(it.second==k)\n                {\n                    ;;\n                }\n                else\n                {\n                    ff=1;\n                }\n            }\n            if(ff==0)cnt++;\n            //cout<<cnt<<endl;\n            for(int i=p; i<n; i++)\n            {\n                mp[s[i]]++;\n                mp[s[i-p]]--;\n                if(mp[s[i-p]]<=0)\n                {\n                    mp.erase(s[i-p]);\n                }\n                int f=0;\n                for(auto it:mp)\n                {\n                    if(it.second==k)\n                    {\n                        ;;\n                    }\n                    else\n                    {\n                        f=1;\n                        break;\n                    }\n                }\n                if(f==0)cnt++;\n            }\n        }\n\n    }\n    return cnt;\n}\n    int countCompleteSubstrings(string s, long long int k) {\n        int nn=s.size();\n        string st="";\n        long long int ans=0;\n        for(int i=0;i<nn-1;i++)\n        {\n             st+=s[i];\n             if(abs(s[i]-s[i+1])>2)\n             {\n                 ans+=solve(st,k);\n                 st="";\n             }\n        }\n        st+=s[nn-1];\n        ans+=solve(st,k);\n        return ans;\n    }\n};\n```
['Hash Table', 'String', 'Sliding Window', 'C++']