Below is my 2D array:
int[][] matrix = new int[10000][1000];
The program frequently uses:
Arrays.fill(int[] a, int fromIndex, int toIndex, int val);
It’s to fill a row and column. When I want to fill a row 200 by 1 from 10 to end, I implement the following command:
Arrays.fill(matrix[200], 10, 1000, 1);
I want to know how to fill a column without for(). Can anyone tell me if there is an efficient data structure that performs both operations with speed?