public static void findCombosSort(int[] ar) {
        // sort the array
        Arrays.sort(ar);

        // go from left to right and find pairs of numbers to the right that combine for form the sum
        for(int i=0; i<ar.length; i++) {
            int lowInd = i+1;
            int highInd = ar.length-1;
            while(lowInd < highInd) {
                int sum = ar[i] + ar[lowInd] + ar[highInd];
                if (sum == 0) {
                    System.out.println(String.format("%d %d %d", ar[i], ar[lowInd], ar[highInd]));
                    // check for repeats
                    if (ar[lowInd] == ar[lowInd+1] && ar[highInd] == ar[highInd-1]) {
                        System.out.println(String.format("%d %d %d", ar[i], ar[lowInd], ar[highInd]));
                        System.out.println(String.format("%d %d %d", ar[i], ar[lowInd], ar[highInd]));
                    } else if (ar[lowInd] == ar[lowInd+1]) {
                        System.out.println(String.format("%d %d %d", ar[i], ar[lowInd], ar[highInd]));
                    } else if (ar[highInd] == ar[highInd-1]) {
                        System.out.println(String.format("%d %d %d", ar[i], ar[lowInd], ar[highInd]));
                    }
                    // continue search
                    lowInd++;
                    highInd--;
                } else if (sum < 0) {
                    lowInd++;
                } else {
                    highInd--;
                }
            }
        }
    }