Skip to content

Commit d9a1b59

Browse files
authored
Update 1790-check-if-one-string-swap-can-make-strings-equal.js
1 parent 5b157f4 commit d9a1b59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1790-check-if-one-string-swap-can-make-strings-equal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ const areAlmostEqual = function(s1, s2) {
1414

1515
if(arr.length === 1) return false
1616
const [i1, i2] = arr
17-
if(s1[i2] === s2[i1]) return true
17+
if(s1[i2] === s2[i1] && s1[i1] === s2[i2]) return true
1818
return false
1919
};

0 commit comments

Comments
 (0)