@@ -0,0 +1,968 @@
+package coding4fun;%0A%0Aimport java.util.Arrays;%0A%0A/**%0A * Count the number of triples that sum to 0.%0A * %0A * Input: %5B2, 8, -25, -3, 10, 4, -7, -10%5D%0A * Output: %5B-10, 2, 8%5D%0A */%0Apublic class Problem11 %7B%0A    private static int%5B%5D threeSum(int%5B%5D array) %7B%0A        int%5B%5D result = new int%5B3%5D;%0A        for (int i = 0; i %3C array.length; i++) %7B%0A            for (int j = 0; j %3C array.length; j++) %7B%0A                int idx = Arrays.binarySearch(array, -(array%5Bi%5D + array%5Bj%5D));%0A                if (idx %3E= 0) %7B%0A                    result%5B0%5D = array%5Bi%5D;%0A                    result%5B1%5D = array%5Bj%5D;%0A                    result%5B2%5D = array%5Bidx%5D;%0A                    return result;%0A                %7D%0A            %7D%0A        %7D%0A        return result;%0A    %7D%0A    %0A    public static void main(String%5B%5D args) %7B%0A        int%5B%5D array = new int%5B%5D%7B2, 8, -25, -3, 10, 4, -7, -10%7D;%0A        Arrays.sort(array);%0A        int%5B%5D result = threeSum(array);%0A        System.out.println(Arrays.toString(result));%0A    %7D%0A%7D%0A

Add problem 11