Java
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n\n```\n                 //  -_- Please Vote up -_-  //\nclass Solution {\n    public boolean areAlmostEqual(String s1, String s2) {\n        if(s1.equals(s2)) return true;\n        if(s1.length() != s2.length()) return false;\n        ArrayList<Integer> list = new ArrayList<>();\n        int a = 0;\n        boolean toReturn = false;\n        for(int i = 0; i < s1.length(); i++){\n            if(s1.charAt(i) != s2.charAt(i)) list.add(i);\n        }\n        if(list.size() > 2) return false;\n        if(list.size() == 2) \n        {\n            int i = list.get(0) , j = list.get(1);\n            toReturn = s1.charAt(i) == s2.charAt(j) && s1.charAt(j) == s2.charAt(i);\n            return toReturn;\n        }\n        \n        return toReturn;\n    }\n}\n```
['Java']