@@ -0,0 +1,1826 @@
+package coding4fun;%0A%0A/**%0A * Checks if string c is a combination of strings a and b.%0A *%0A * %3Cpre%3E%0A * Input:%0A * a: abxm%0A * b: hckd%0A * c: ahcbxkmd%0A * Output: true%0A *%0A * Input:%0A * a: abc%0A * b: aef%0A * c: aeabcf%0A * Output: true%0A *%0A * Input:%0A * a: abc%0A * b: aef%0A * c: abacef%0A * Output: true%0A *%0A * Input:%0A * a: abc%0A * b: aef%0A * c: aeacbf%0A * Output: false%0A *%0A * Input:%0A * a: abc%0A * b: aef%0A * c: axeabcf%0A * Output: false%0A *%0A * Input:%0A * a: abc%0A * b: aef%0A * c: abc%0A * Output: false%0A *%0A * Input:%0A * a: aaabc%0A * b: aaeaf%0A * c: aaaaeaafbc%0A * Output: true%0A * %3C/pre%3E%0A */%0Apublic class Problem53 %7B%0A    private static boolean isCombination(String a, String b, String c) %7B%0A        return isCombination(a, b, c, %22%22, 0, 0);%0A    %7D%0A%0A    private static boolean isCombination(String a, String b, String c, String accu, int ai, int ci) %7B%0A        if (ai == a.length() %7C%7C ci == c.length()) %7B%0A            return accu.equals(b);%0A        %7D%0A        boolean found = false;%0A        if (a.charAt(ai) == c.charAt(ci)) %7B%0A            found %7C= isCombination(a, b, c, accu + %22%22, ai + 1, ci + 1);%0A            found %7C= isCombination(a, b, c, accu + %22%22, ai, ci + 1);%0A        %7D%0A        found %7C= isCombination(a, b, c, accu + c.charAt(ci), ai, ci + 1);%0A        return found;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        System.out.println(isCombination(%22abxm%22, %22hckd%22, %22ahcbxkmd%22)); // true%0A        System.out.println(isCombination(%22abc%22, %22aef%22, %22aeabcf%22)); // true%0A        System.out.println(isCombination(%22abc%22, %22aef%22, %22abacef%22)); // true%0A        System.out.println(isCombination(%22abc%22, %22aef%22, %22aeacbf%22)); // false%0A        System.out.println(isCombination(%22abc%22, %22aef%22, %22axeabcf%22)); // false%0A        System.out.println(isCombination(%22abc%22, %22aef%22, %22abc%22)); // false%0A        System.out.println(isCombination(%22aaabc%22, %22aaeaf%22, %22aaaaeaafbc%22)); // true%0A    %7D%0A%7D%0A

Add problem 53