} else if already calculated then return that value . Taking Absolute difference .
if ( dp [ Math . Abs ( x - tx ) , Math . Abs ( y - ty ) ] != 0 ) { return dp [ Math . Abs ( x - tx ) , Math . Abs ( y - ty ) ] ; } else {