Manhattan Distance
Easy · Interfaces
The type alias Point describes an object with numeric x and y.
Write manhattan(a: Point, b: Point): number that returns |a.x - b.x| + |a.y - b.y| (the number of grid steps between the points).
Next: Book Reading Time