100% CPP
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n\nIf an "almost equal" pair is found, ans is incremented by 1.\nThe index
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n\nIf an "almost equal" pair is found, ans is incremented by 1.\nThe index i is incremented by 1 again (total increment by 2 for this iteration) to skip to the next non-overlapping pair. This prevents counting overlapping pairs.\nFor example, in the string "ab", after counting the pair (\'a\', \'b\'), the loop skips over \'b\' to avoid checking overlapping pairs like (\'b\', \'c\') if \'c\' were the next character.\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:\n    int removeAlmostEqualCharacters(string s) {\n        int ans = 0;\n        for(int i = 0; i < s.size() - 1; i ++) {\n            if(abs(s[i] - s[i + 1]) <= 1) {\n                ans += 1;\n                i += 1;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']