Java || 100% beats || 0(N) || ❤️❤️
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:0(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:0(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public boolean areAlmostEqual(String s1, String s2) {\n        int count = 0;\n        int temp1[] = new int[26] , temp2[] = new int[26];\n        for(int i=0; i<s1.length(); i++){\n            int a1 = s1.charAt(i)-\'a\', a2 = s2.charAt(i)-\'a\';\n            temp1[a1]++; temp2[a2]++;  \n        }\n        for(int i=0; i<temp1.length; i++){\n            if(temp1[i]!=temp2[i]) return false;\n        }\n        for(int i=0; i<s1.length(); i++){\n            if(s1.charAt(i)!=s2.charAt(i)) count++;\n            if(count>2) return false;\n        }\n        return true;\n    }\n}\n```
['Java']