Easily understandable | O(n) time | O(1) space
Intuition\nafter trying out various approaches, figured out that for a string to be complete, if it has x unique chars its size has to be xk where 1<=x<=26\n\n#
# Intuition\nafter trying out various approaches, figured out that for a string to be complete, if it has x unique chars its size has to be x*k where 1<=x<=26\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nsolving for all possible sizes a string can have and then increasing counter if unique char is x and its size of x*k. Also make sure to clear the **mp** array if **abs(word[i]-word[i-1]>2)** as char at i cannot be a part of substring.\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n  O(26n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(26)\n# Code\n```\n//It is done for fast io\nint init=[](){\n ios::sync_with_stdio(0);\n cin.tie(0); \n cout.tie(0); \n return 0;\n }();\n\nclass Solution {\npublic:\n    int countCompleteSubstrings(string word, int k) {\n          int completesubcount=0;\n\n          for(int p=1;p<=26;p++){\n              int subsize=p*k;\n              int mp[26];\n              memset(mp,0,sizeof(mp));\n              int j=0; \n              int uniquecount=0;\n              //looping for all possible strings that can be unique if subsize<=word.size()\n              if(subsize<=word.size()){\n              for(int i=0;i<word.size();i++){\n                  if(i and abs(word[i]-word[i-1])>2){\n                       memset(mp,0,sizeof(mp));\n                       uniquecount=0;\n                       j=i;\n                   }\n                   mp[word[i]-\'a\']++;\n            //here unique count will only be increased if particular char count is k\n                   uniquecount+=mp[word[i]-\'a\']==k;\n               //reducing window size if current size exceeds permitted size\n                   if(i-j+1>subsize){\n                     mp[word[j]-\'a\']--;\n                     uniquecount-=(mp[word[j]-\'a\']==k-1);\n                     j++;\n                  }\n                    completesubcount+=(uniquecount==p);\n              }\n            }\n        }\n          return completesubcount;\n    }\n};\n```\n# Thanks, Please upvote if liked the solution, let me know your views in comments!!!
['Hash Table', 'Sliding Window', 'C++']