Simple java solution
\n\n# Code\n\nclass Solution {\n    public int removeAlmostEqualCharacters(String word) {\n        int sol = 0;\n        for(int i = 0 ; i < word.length()-1 ; i
\n\n# Code\n```\nclass Solution {\n    public int removeAlmostEqualCharacters(String word) {\n        int sol = 0;\n        for(int i = 0 ; i < word.length()-1 ; i++){\n            if(word.charAt(i) == word.charAt(i+1)|| word.charAt(i)-1 == word.charAt(i+1)\n            ||word.charAt(i) == word.charAt(i+1)-1){\n                sol++;\n                i++;\n            }\n        }\n        return sol;\n    }\n}\n```
['Java']