Problems > The King's Walk > Editorial

The King's Walk — Solution & Editorial

Back to the Problem

Diagonal steps cover both axes at once, so the answer is the larger of the two absolute differences.

Complexity: O(1)