Search
⌘K

Leetcode 1266. Minimum Time Visiting All Points

Given an ordered list of integer-coordinate points, find the minimum total seconds to visit them in sequence when in one second you may move 1 unit horizontally, vertically, or diagonally (a diagonal counts as one step in both axes). The core insight is that the time between two consecutive points is the Chebyshev distance (max(|dx|,|dy|)), so sum that over all adjacent pairs.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.