public Pair findNumbers(int input[]){
        Pair p = new Pair();
        for(int i=0; i < input.length; i++){
            if(input[Math.abs(input[i])-1] < 0){
                p.repeating = Math.abs(input[i]);
            }else{
                input[Math.abs(input[i])-1] = -input[Math.abs(input[i])-1];
            }
        }
    
        for(int i=0; i < input.length; i++){
            if(input[i] < 0){
                input[i] = -input[i];
            }else{
                p.missing = i + 1;
            }
        }
        return p;
    }
http://www.geeksforgeeks.org/find-a-repeating-and-a-missing-number/
src/com/interview/array/RepeatingAndMissingNumber.java