Skip to content

Commit 477bda4

Browse files
committed
Fixed some style issues
1 parent d0e95a5 commit 477bda4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

maths/hamming_distance.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ const HammingDistance = (str1: string, str2: string) => {
1717

1818
let dist = 0
1919

20-
for (let i = 0; i < str1.length; i += 1) {
21-
if (str1[i] !== str2[i]) dist += 1
22-
}
20+
for (let i = 0; i < str1.length; i++) if (str1[i] !== str2[i]) dist++
2321

2422
return dist
2523
}

0 commit comments

Comments
 (0)