Greedy--onePass--C++|| 100% faster🔥|| easy to understand
Intuition\n Describe your first thoughts on how to solve this problem. \njust check the given condition is valid or not. if not increase count.\n\n# Approach\n 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\njust check the given condition is valid or not. if not increase count.\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    O(n)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n    O(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int removeAlmostEqualCharacters(string word) {\n        int cnt = 0;\n    \n        for (int i = 1; i < word.length(); ++i) {\n            if (word[i] == word[i - 1] || abs(word[i] - word[i - 1]) == 1) {\n                cnt++;\n                i++;\n            }\n        }\n\n        return cnt;\n    }\n};\n```
['C++']