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