Easy C++ Solution || Two Pointers✔
\n# Code\n\nclass Solution {\npublic:\n    bool areAlmostEqual(string s1, string s2) {\n        if (s1==s2)return true;\n        int st=0; int en=s1.size()-1;\n
\n# Code\n```\nclass Solution {\npublic:\n    bool areAlmostEqual(string s1, string s2) {\n        if (s1==s2)return true;\n        int st=0; int en=s1.size()-1;\n        while (s2[st]==s1[st])st++;\n        while (s2[en]==s1[en])en--;\n        //if (st>=en)return true;\n        swap(s2[st],s2[en]);\n        return s1==s2;\n    }\n};\n```\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n
['Two Pointers', 'String', 'C++']