File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
lesson_13/maps_java/maps_app/src/main/java/com/codedifferently/lesson13 Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments