We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 373e52e commit e234bf5Copy full SHA for e234bf5
lesson_13/maps_java/maps_app/src/main/java/com/codedifferently/lesson13/Lesson13.java
@@ -4,9 +4,9 @@ public class Lesson13 {
4
public int findPermutationDifference(String s, String t) {
5
int result = 0;
6
int strLen = s.length();
7
- for(int i= 0; i < strLen ; i++){
8
- char ch = s.charAt(i);
9
- result = result + ( Math.abs(s.indexOf(ch) - t.indexOf(ch)));
+ for (int i = 0; i < strLen; i++) {
+ char ch = s.charAt(i);
+ result = result + (Math.abs(s.indexOf(ch) - t.indexOf(ch)));
10
}
11
return result;
12
0 commit comments