Difference of Number of Distinct Values on Diagonals
For each cell, count distinct values on the diagonal above-left and below-right, then store the gap between the two counts.
For each cell, count distinct values on the diagonal above-left and below-right, then store the gap between the two counts.