Java || Kotlin
CodeCode
# Code
```java []
class Solution {
    public int removeAlmostEqualCharacters(String s) {
    int res = 0;
    for(int i = 1; i < s.length(); ++i){
        if(Math.abs(s.charAt(i) - s.charAt(i-1)) <= 1) { 
            res++; 
            i++; 
        }
    }
    return res;
    }
}

```

# Code
``` kotlin []
class Solution {
    fun removeAlmostEqualCharacters(word: String): Int {
        var res = 0
        var i = 1
        while (i < word.length) {
            if (kotlin.math.abs(word[i] - word[i - 1]) <= 1) {
                res++
                i++
            }
            i++
        }
        return res
    }
}
```

['Java']