Either problem statement is incorrect or the test case given is incorrect


#1

Distance between two cells (x1, y1) and (x2, y2) is defined as ** x1 - y1 + x2 - y2 **. ,
It should be ** x1 - x2 + y1 - y2 **.


#2

Distance between two cells (x1, y1) and (x2, y2) is defined as |x1 - y1| + |x2 - y2| .