easy understand
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)$$ -->\nO(n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n# Code\n```\nclass Solution {\npublic:\n    int countCompleteSubstrings(string word, int k) {\n        if (k == 1) {\n            return solve(word);\n        }\n\n        int len = 0, ans = 0, n = word.length();\n        for (int i = 1; i <= 26; i++) {\n            len += k;\n            if (len > n) {\n                break;\n            }\n            vector<int> cnts(26);\n            int num = 1;\n            cnts[word[0] - \'a\'] = 1;\n            for (int j = 1; j < n; j++) {\n                if (abs(word[j] - word[j - 1]) > 2) {\n                    cnts.clear();\n                    cnts.resize(26);\n                    cnts[word[j] - \'a\'] = 1;\n                    num = 1;\n                    continue;\n                }\n\n                num++;\n                cnts[word[j] - \'a\']++;\n                if (num == len) {\n                    bool b = true;\n                    for (auto& cnt : cnts) {\n                        if (cnt > 0 && cnt != k) {\n                            b = false;\n                            break;\n                        }\n                    }\n                    if (b) {\n                        ans++;\n                    }\n                    cnts[word[j - len + 1] - \'a\']--;\n                    num--;\n                }\n            }\n        }\n        return ans;\n    }\n\nprivate:\n    int solve(const string& word) {\n        int ans = 0, n = word.length();\n        for (int i = 1; i <= 26; i++) {\n            if (i > n) {\n                break;\n            }\n            vector<int> cnts(26);\n            int num = 0;\n            for (int j = 0; j < n; j++) {\n                if (i > 1 && j > 0 && abs(word[j] - word[j - 1]) > 2) {\n                    cnts.clear();\n                    cnts.resize(26);\n                    cnts[word[j] - \'a\'] = 1;\n                    num = 1;\n                    continue;\n                }\n\n                num++;\n                cnts[word[j] - \'a\']++;\n                if (num == i) {\n                    bool b = true;\n                    for (auto& cnt : cnts) {\n                        if (cnt > 0 && cnt != 1) {\n                            b = false;\n                            break;\n                        }\n                    }\n                    if (b) {\n                        ans++;\n                    }\n                    cnts[word[j - i + 1] - \'a\']--;\n                    num--;\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']