Skip to content

Commit

Permalink
fix: ran gradle command to fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
marleomac3 committed Oct 24, 2024
1 parent 3499a6b commit fa40e21
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ public class Lesson13 {
*/

/**
* We need to return the absolute difference btw. a chars index in both 's' and 't'
* if s = "abc" and t = "bac"
* for s: a @index 0, b @index 1, c @index 2
* for t: a @index 1, b @index 0, c @index 2
* the math: |0 - 1| + |1 - 0| + \2 - 2| = |-1| + |1| + |0| = 1 + 1 + 0 = 2 we return 2
* We need to return the absolute difference btw. a chars index in both 's' and 't' if s = "abc"
* and t = "bac" for s: a @index 0, b @index 1, c @index 2 for t: a @index 1, b @index 0, c @index
* 2 the math: |0 - 1| + |1 - 0| + \2 - 2| = |-1| + |1| + |0| = 1 + 1 + 0 = 2 we return 2
*/
public int findPermutationDifference(String s, String t) {
var compareStrings = new HashMap<Character, Integer>();
Expand Down

0 comments on commit fa40e21

Please sign in to comment.