pure-jcore/src/main/java/leetcode/FourSum.java
/**
     * all combinations with three indexes in 2d array.
     */
all combinations with three indexes in 2d array.
all combinations with three indexes in 2d array .
public int[][] threeSumsAll(int[] nums, int target) {
        int len = nums.length;
        List<List<int[]>> resultList = new ArrayList<>();
        for (int i = 0; i < len - 1; i++) {
            int third = nums[i];
            int pairTarget = target - third;
            List<int[]> listOf3Indexes = threeSums_WithGivenIndex(nums, pairTarget, i);
            resultList.add(listOf3Indexes);
        }
        return convertListTo2dArrayWithEachOf3Elements(resultList);
    }
public int [ ] [ ] threeSumsAll ( int [ ] nums , int target ) { int len = nums . length ; List < List < int [ ] > > resultList = new ArrayList < > ( ) ; for ( int i = 0 ; i < len - 1 ; i ++ ) { int third = nums [ i ] ; int pairTarget = target - third ; List < int [ ] > listOf3Indexes = threeSums_WithGivenIndex ( nums , pairTarget , i ) ; resultList . add ( listOf3Indexes ) ; } return convertListTo2dArrayWithEachOf3Elements ( resultList ) ; }
all combinations with three indexes in 2d array.
all combinations with three indexes in 2d array .