Easy solution 100% faster
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)$$ -->\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 c=0;\n        for(int i=0; i<s.size(); i++)\n        {\n           int a=s[i]-\'a\';\n            int j=i+1;\n            int d=0;\n            while(abs((s[j]-\'a\')-a)<=1)\n            {\n                d++;\n                 a=s[j]-\'a\';\n                j++;\n               \n            }\n            c+=d/2;\n            if(d%2)\n                c++;\n            i=j-1;\n            \n        }\n        return c;\n       \n    }\n};\n```
['C++']