Space efficient CPP soln || Intuitive approach (No Hash Table) || Checking indices with diff chars
Complexity
Time complexity: O(n)

Space complexity: O(1)
Code
# 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
```cpp []
class Solution {
public:
    bool areAlmostEqual(string s1, string s2) {
        int n = s1.length();
        vector<int> diff;
        for (int i = 0; i < n; i++) {
            if (s1[i] != s2[i]) {
                if (diff.size() == 2)
                    return false;
                diff.push_back(i);
            }
        }
        
        if (diff.size() == 0)
            return true;
        if (diff.size() == 1)
            return false;
        if (s1[diff[0]] != s2[diff[1]] || s1[diff[1]] != s2[diff[0]])
            return false;
        return true;
    }
};
```
['String', 'Counting', 'C++']