@@ -0,0 +1,1540 @@
+/**%0A * Check duplicates in two arrays.%0A *%0A * @author Elvis Stansvik %3Celvstone@gmail.com%3E%0A */%0Aclass Duplicates %7B%0A    public static void main(String%5B%5D args) %7B%0A        int%5B%5D l1;%0A        int%5B%5D l2;%0A        Checker checker;%0A%0A        l1 = new int%5B10%5D;%0A        l2 = new int%5B10%5D;%0A%0A        l1%5B0%5D = 1;%0A        l1%5B1%5D = 2;%0A        l1%5B2%5D = 5;%0A        l1%5B3%5D = 7;%0A        l1%5B4%5D = 9;%0A        l1%5B5%5D = 20;%0A        l1%5B6%5D = 21;%0A        l1%5B7%5D = 55;%0A        l1%5B8%5D = 91;%0A        l1%5B9%5D = 204;%0A%0A        l2%5B0%5D = 6;%0A        l2%5B1%5D = 7;%0A        l2%5B2%5D = 9;%0A        l2%5B3%5D = 42;%0A        l2%5B4%5D = 49;%0A        l2%5B5%5D = 91;%0A        l2%5B6%5D = 103;%0A        l2%5B7%5D = 304;%0A        l2%5B8%5D = 444;%0A        l2%5B9%5D = 552;%0A%0A        checker = new Checker();%0A%0A        System.out.println(checker.duplicates(l1, l2));%0A    %7D%0A%7D%0A%0A/**%0A * Checker is a duplicate checker.%0A *%0A * The duplicates method will return the number of elements that exists%0A * in both of the given arrays.%0A */%0Aclass Checker %7B%0A    public int duplicates(int%5B%5D l1, int%5B%5D l2) %7B%0A        int N;%0A        int M;%0A%0A        int i;%0A        int j;%0A        int dupes;%0A%0A        N = l1.length;%0A        M = l2.length;%0A        i = 0;%0A        j = 0;%0A        dupes = 0;%0A        while (i %3C N && j %3C M) %7B%0A            if (l1%5Bi%5D %3C l2%5Bj%5D) %7B%0A                i = i + 1;%0A            %7D else %7B%0A                if (l2%5Bj%5D %3C l1%5Bi%5D) %7B%0A                    j = j + 1;%0A                %7D else %7B%0A                    dupes = dupes + 1;%0A                    i = i + 1;%0A                    j = j + 1;%0A                %7D%0A            %7D%0A        %7D%0A        return dupes;%0A    %7D%0A%7D%0A

Add another test case.