Skip to content

Commit 188b65a

Browse files
committed
fix: named changed as requested
1 parent 5b13ff8 commit 188b65a

File tree

1 file changed

+4
-4
lines changed
  • lesson_13/maps_java/maps_app/src/main/java/com/codedifferently/lesson13

1 file changed

+4
-4
lines changed

lesson_13/maps_java/maps_app/src/main/java/com/codedifferently/lesson13/Lesson13.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ public class Lesson13 {
99
* https://leetcode.com/problems/permutation-difference-between-two-strings
1010
*/
1111
public int findPermutationDifference(String s, String t) {
12-
var charCountS = new HashMap<Character, Integer>();
12+
var stringS = new HashMap<Character, Integer>();
1313

1414
int totalDifference = 0;
1515

1616
for (int sIndex = 0; sIndex < s.length(); sIndex++) {
17-
charCountS.put(s.charAt(sIndex), sIndex);
17+
stringS.put(s.charAt(sIndex), sIndex);
1818
}
1919
for (int tIndex = 0; tIndex < t.length(); tIndex++) {
20-
int countIndexS = charCountS.put(t.charAt(tIndex), tIndex);
20+
int countIndexS = stringS.put(t.charAt(tIndex), tIndex);
2121

2222
totalDifference += Math.abs(countIndexS - tIndex);
2323
}
2424
return totalDifference;
2525
}
26-
}
26+
}

0 commit comments

Comments
 (0)