pure-jcore/src/main/java/leetcode/FourSum.java
/**
     * Convert List of int[2] to 2d array with each containing 2 elements.
     */
Convert List of int[2] to 2d array with each containing 2 elements.
Convert List of int [ 2 ] to 2d array with each containing 2 elements .
private int[][] convertListTo2dArrayWithEachOf2Elements(List<int[]> list) {
        int[][] results = new int[list.size()][2];
        int i = 0;
        for (int[] pair : list) {
            results[i++] = pair;
        }
        return results;
    }
private int [ ] [ ] convertListTo2dArrayWithEachOf2Elements ( List < int [ ] > list ) { int [ ] [ ] results = new int [ list . size ( ) ] [ 2 ] ; int i = 0 ; for ( int [ ] pair : list ) { results [ i ++ ] = pair ; } return results ; }
Convert List of int[2] to 2d array with each containing 2 elements.
Convert List of int [ 2 ] to 2d array with each containing 2 elements .