package leetcode;

public class Problem1202 {
}

@@ -16,33 +16,831 @@
 e;%0A%0A
-public class Problem1202 %7B
+import java.util.Arrays;%0Aimport java.util.List;%0A%0A/**%0A * https://leetcode.com/problems/smallest-string-with-swaps/%0A */%0Apublic class Problem1202 %7B%0A    public String smallestStringWithSwaps(String s, List%3CList%3CInteger%3E%3E pairs) %7B%0A        // TODO%0A        return null;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem1202 prob = new Problem1202();%0A        System.out.println(prob.smallestStringWithSwaps(%0A            %22dcab%22, Arrays.asList(Arrays.asList(0, 3), Arrays.asList(1, 2)))); // %22abcd%22%0A        System.out.println(prob.smallestStringWithSwaps(%0A            %22dcab%22, Arrays.asList(Arrays.asList(0, 3), Arrays.asList(1, 2), Arrays.asList(0, 2)))); // %22abcd%22%0A        System.out.println(prob.smallestStringWithSwaps(%0A            %22cba%22, Arrays.asList(Arrays.asList(0, 1), Arrays.asList(1, 2)))); //  %22abc%22%0A    %7D
 %0A%7D%0A

Update problem 1202