package leetcode;

import java.util.Arrays;
import java.util.List;

/**
 * https://leetcode.com/problems/smallest-string-with-swaps/
 */
public class Problem1202 {
    public String smallestStringWithSwaps(String s, List<List<Integer>> pairs) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem1202 prob = new Problem1202();
        System.out.println(prob.smallestStringWithSwaps(
            "dcab", Arrays.asList(Arrays.asList(0, 3), Arrays.asList(1, 2)))); // "abcd"
        System.out.println(prob.smallestStringWithSwaps(
            "dcab", Arrays.asList(Arrays.asList(0, 3), Arrays.asList(1, 2), Arrays.asList(0, 2)))); // "abcd"
        System.out.println(prob.smallestStringWithSwaps(
            "cba", Arrays.asList(Arrays.asList(0, 1), Arrays.asList(1, 2)))); //  "abc"
    }
}

@@ -824,21 +824,168 @@
 ))); // 
- 
 %22abc
+%22%0A        System.out.println(prob.smallestStringWithSwaps(%0A            %22edcab%22, Arrays.asList(Arrays.asList(1, 4), Arrays.asList(2, 3)))); // %22ebacd
 %22%0A    %7D%0A

Update problem 1202