I have the following jammed array
int[][] dists1 = new int[][] { new int[]{0,2,3,5,2,4}, new int[]{2,0,1,3,5,3}, new int[]{3,1,0,4,4,3}, new int[]{5,3,4,0,2,4}, new int[]{2,5,4,2,0,2}, new int[]{4,3,3,4,2,0} };
and I found out how to delete one specific column and row (e.g. 3). Here is the link .
Now I want to have dynamic programming as follows: consider this array
int[] day={1,4,5};
this array may be another array ( I used a dynamic term for this reason )
where the elements of the "day" array show the rows and columns of the "dists1" matrix, so I want the new gear array named "dists2" to contain only columns and rows 1,4,5 with the row and column "0" because it is fixed row and column as below:
int[][] dists2 = new int[][] { new int[]{0,2,2,4}, new int[]{2,0,5,3}, new int[]{2,5,0,2}, new int[]{4,3,2,0} };