public static void main(String args[]){
        AggregateNumber an = new AggregateNumber();
        int number[] = {1,1,2,2,3,3,5,5,8,8,1,4,3}; //true 11 + 22 == 33(+22) = 55(+33) = 88(+55) = 143
        int number1[] = {1,1,2,2,3,3,5,5,8,8,1,4,4};//false 11 + 22 == 33(+55) = 88(+55) != 144 
        int number2[] = {1,1,2,2,3,2,3,4}; //true 11 + 223 = 234
        int number3[] = {1,1,2,2,3,2,3,4,4,5,7}; //true 11 + 223 = 234(+223)=457
        System.out.println(an.isAggregate(number));
        System.out.println(an.isAggregate(number1));
        System.out.println(an.isAggregate(number2));
        System.out.println(an.isAggregate(number3));
    }
Number such that 11 + 11 = 22, 11 +22 = 33, 22 +33 = 55
so 1111223355 is aggregate number
src/com/interview/number/AggregateNumber.java