Skip to content

Commit cf7491a

Browse files
author
AmiyahJo
committed
fix: lesson13.ts variables changed from let to const
1 parent 9b0c6c1 commit cf7491a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lesson_13/maps_ts/src/lesson13.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function findPermutationDifference(s: string, t: string): number {
2-
let charPositionMap = new Map<string, number>();
2+
const charPositionMap = new Map<string, number>();
33

44
let totalDifference = 0;
55

@@ -8,7 +8,7 @@ export function findPermutationDifference(s: string, t: string): number {
88
}
99

1010
for (let tIndex = 0; tIndex < t.length; tIndex++) {
11-
let indexInS = charPositionMap.get(t.charAt(tIndex));
11+
const indexInS = charPositionMap.get(t.charAt(tIndex));
1212

1313
if (indexInS != undefined) {
1414
totalDifference += Math.abs(indexInS - tIndex);

0 commit comments

Comments
 (0)