Manhattan Distance in Matrices
The same concept can also be applied in matrices-
where the x1, x2, y1, and y2 denote the row numbers and column numbers of two cells respectively. In that case, the Manhattan Distance between any two cells namely c1 and c2 is — |x1-x2|+|y1-y2|.
Applicatio...