File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
lesson_13/maps_java/maps_app/src/main/java/com/codedifferently/lesson13 Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,14 @@ public class Lesson13 {
4
4
5
5
/**
6
6
* Provide the solution to LeetCode 3146 here:
7
- * https://leetcode.com/problems/permutation-difference-between-two-strings
8
- * You are given two strings s and t such that every character occurs at most once in s and t is a permutation of s.
9
- * The permutation difference between s and t is defined as
10
- * the sum of the absolute difference between the index of the occurrence
11
- * of each character in s and the index of the occurrence of the same character in t.
12
- * Return the permutation difference between s and t.
7
+ * https://leetcode.com/problems/permutation-difference-between-two-strings You are given two
8
+ * strings s and t such that every character occurs at most once in s and t is a permutation of s.
9
+ * The permutation difference between s and t is defined as the sum of the absolute difference
10
+ * between the index of the occurrence of each character in s and the index of the occurrence of
11
+ * the same character in t. Return the permutation difference between s and t.
13
12
*/
14
13
public int findPermutationDifference (String s , String t ) {
15
-
14
+
16
15
int permuDifference = 0 ;
17
16
// Created a counter to track Permutation Difference
18
17
for (int i = 0 ; i < s .length (); i ++) {
You can’t perform that action at this time.
0 commit comments