Traverse all the diagonals starting at last row
for ( int j = 1 ; j < m ; j ++ ) { Vector < Integer > v1 = new Vector < Integer > ( ) ; Vector < Integer > v2 = new Vector < Integer > ( ) ; int r = n - 1 ; int col = j ;