package leetcode;

/**
 * https://leetcode.com/problems/longest-uncommon-subsequence-ii/
 */
public class Problem522 {
    public int findLUSlength(String[] strs) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem522 prob = new Problem522();
        System.out.println(prob.findLUSlength(new String[]{"aba", "cdc", "eae"})); // 3
        System.out.println(prob.findLUSlength(new String[]{"aba", "eae"})); // 2
        System.out.println(prob.findLUSlength(new String[]{"aabbcc", "aabbcc","cb","abc"})); // 2
    }
}

@@ -170,32 +170,785 @@
     
-// TODO%0A        return 0
+int max = 0;%0A        for (int i = 0; i %3C strs.length; i++) %7B%0A            for (int j = i + 1; j %3C strs.length; j++) %7B%0A                String a = strs%5Bi%5D;%0A                String b = strs%5Bj%5D;%0A                if (a.length() %3C b.length()) %7B%0A                    a = strs%5Bj%5D;%0A                    b = strs%5Bi%5D;%0A                %7D%0A                int count = 0;%0A                for (int x = 0; x %3C a.length(); x++) %7B%0A                    int y = 0;%0A                    while (y %3C b.length() && a.charAt(x) != b.charAt(y)) %7B%0A                        y++;%0A                    %7D%0A                    if (y %3C b.length()) %7B%0A                        count++;%0A                    %7D%0A                %7D%0A                max = Math.max(max, a.length() - count);%0A            %7D%0A        %7D%0A        return max
 ;%0A  
@@ -1041,16 +1041,18 @@
 m522();%0A
+//
         
@@ -1131,16 +1131,16 @@
 ); // 3%0A
-
         
@@ -1208,24 +1208,26 @@
 e%22%7D)); // 2%0A
+//
         Syst

Update problem 522