exchanging the coordinates x with y of both knight and target will result in same ans .
dp [ abs ( y - ty ) ] [ abs ( x - tx ) ] = dp [ abs ( x - tx ) ] [ abs ( y - ty ) ] ; NEW_LINE return dp [ abs ( x - tx ) ] [ abs ( y - ty ) ] ; NEW_LINE