We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b157f4 commit d9a1b59Copy full SHA for d9a1b59
1790-check-if-one-string-swap-can-make-strings-equal.js
@@ -14,6 +14,6 @@ const areAlmostEqual = function(s1, s2) {
14
15
if(arr.length === 1) return false
16
const [i1, i2] = arr
17
- if(s1[i2] === s2[i1]) return true
+ if(s1[i2] === s2[i1] && s1[i1] === s2[i2]) return true
18
return false
19
};
0 commit comments