package leetcode;

/**
 * https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram/
 */
public class Problem1347 {
    public int minSteps(String s, String t) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1347 prob = new Problem1347();
        System.out.println(prob.minSteps("bab", "aba")); // 1
        System.out.println(prob.minSteps("leetcode", "practice")); // 5
        System.out.println(prob.minSteps("anagram", "mangaar")); // 0
        System.out.println(prob.minSteps("xxyyzz", "xxyyzz")); // 0
        System.out.println(prob.minSteps("friend", "family")); // 4
    }
}

@@ -191,335 +191,649 @@
     
-// TODO%0A        return 0;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem1347 prob = new Problem1347();%0A        System.out.println(prob.minSteps(%22bab%22, %22aba%22)); // 1%0A        System.out.println(prob.minSteps(%22leetcode%22, %22practice%22)); // 5%0A        System.out.println(prob.minSteps(%22anagram%22, %22mangaar%22)); //
+int%5B%5D countA = new int%5B26%5D;%0A        for (char c : s.toCharArray()) %7B%0A            countA%5Bc - 'a'%5D++;%0A        %7D%0A        int%5B%5D countB = new int%5B26%5D;%0A        for (char c : t.toCharArray()) %7B%0A            countB%5Bc - 'a'%5D++;%0A        %7D%0A        for (int i = 0; i %3C countA.length; i++) %7B%0A            if (countA%5Bi%5D == countB%5Bi%5D) %7B%0A                countA%5Bi%5D = 0;%0A                countB%5Bi%5D = 0;%0A            %7D else if (countA%5Bi%5D %3C countB%5Bi%5D) %7B%0A                countA%5Bi%5D = 0;%0A                countB%5Bi%5D -= countB%5Bi%5D;%0A            %7D else %7B%0A                countA%5Bi%5D -= countB%5Bi%5D;%0A                countB%5Bi%5D -= 0;%0A            %7D%0A        %7D%0A        int answer =
  0
+;
 %0A   
@@ -841,135 +841,115 @@
     
-System.out.println(prob.minSteps(%22xxyyzz%22, %22xxyyzz%22)); // 0%0A        System.out.println(prob.minSteps(%22friend%22, %22family%22)); // 4
+for (int i = 0; i %3C countA.length; i++) %7B%0A            answer += countA%5Bi%5D;%0A        %7D%0A        return answer;
 %0A   

Solve problem 1347