O(26*N) Sliding Window
Intuition\n1. Check different-sized windows that contain 1, 2, ... up to 26 unique characters. Respective window size will be 1k, 2k, ... up to 26k.\n2. For eac
### Intuition\n1. Check different-sized windows that contain 1, 2, ... up to 26 unique characters. Respective window size will be 1k, 2k, ... up to 26k.\n2. For each window size, we track character frequencies and reset when characters are too far apart alphabetically, counting valid "complete" substrings.\n\n### Complexity\n    - Time complexity: O(26*N)\n    - Space complexity: O(1)\n\n### Code\n```python3 []\nclass Solution:\n    def countCompleteSubstrings(self, word: str, k: int) -> int:\n        def solve(s,unique):\n            i,count,hm,ans=0,0,{},0\n            for j,c in enumerate(s):\n                hm[c]=hm.setdefault(c,0)+1\n                count+=1\n                while len(hm)>unique or hm[c]>k or j-i+1>unique*k or (j-i+1>1 and abs(ord(s[j-1])-ord(s[j]))>2): \n                    hm[s[i]]-=1\n                    if hm[s[i]]==0: del hm[s[i]]\n                    count-=1\n                    i+=1\n                if len(hm)==unique and count==unique*k: ans+=1\n            return ans\n        return sum(solve(word,unique) for unique in range(1,len(set(word))+1))\n```
['Python3']