Python3 O(N) Solution with two pointers (100.00% Runtime)
IntuitionApproach
Iteratively compare ith and i-1th elements:
If ith and i-1th elements are differnent by ord() of 2, continue (i += 1).
If not, then it is a si
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
![image.png](https://assets.leetcode.com/users/images/332afddb-9200-4bba-8057-1ea632605eab_1740319747.4017093.png)

# Approach
<!-- Describe your approach to solving the problem. -->
- Iteratively compare ith and i-1th elements:
  - If ith and i-1th elements are differnent by ord() of 2, continue (i += 1).
  - If not, then it is a situation like "...acdx...":
    - Current is "d".
    - In this case, we change "d" to something else that both "c" and "x" not overlap.
    - Then we move by i += 2 since we already dealt with for "x" too.
    - Increment the operation count.
- Return the final operation count.

# Complexity
- Time complexity: O(N)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
If this solution is similar to yours or helpful, upvote me if you don't mind
```python3 []
class Solution:
    def removeAlmostEqualCharacters(self, word: str) -> int:
        i = 1
        l = len(word)

        c = 0 
        while i < l:
            o1 = abs(ord(word[i])-ord(word[i-1]))
            if o1 < 2:
                c += 1
                i += 1
            i += 1
        
        return c

```
['Array', 'Math', 'Two Pointers', 'String', 'Greedy', 'String Matching', 'Counting', 'Enumeration', 'Python', 'Python3']