public static void main(String args[]){
        MissingNumbers mn = new MissingNumbers();
        int arr[] = {1,2,3,5,5};
        Pair p = mn.findMissingAndRepeated(arr, 5);
        System.out.println(p.x + " " + p.y);
        int arr1[] = {1,5,3,6};
        p = mn.findMissingAndRepeated(arr1, 6);
        System.out.println(p.x + " " + p.y);
    }
http://www.geeksforgeeks.org/find-the-two-repeating-elements-in-a-given-array/
http://www.geeksforgeeks.org/find-a-repeating-and-a-missing-number/
src/com/interview/bits/MissingNumbers.java