Easy
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 {\n    public int removeAlmostEqualCharacters(String s) {\n        int ans = 0;\n        int i = 0;\n        while (i < s.length() - 1) {\n            if (Math.abs((int) s.charAt(i) - (int) s.charAt(i + 1)) ==1 || \n            Math.abs((int) s.charAt(i) - (int) s.charAt(i + 1)) ==0) {\n                i += 2;\n                ans++;\n            } else\n                i++;\n        }\n        return ans;\n    }\n}\n```
['Java']