Minimum Time Visiting All Points
Solve this the way you would in the interview: out loud, on a timer, with an AI interviewer asking follow-ups while you code. You get a scored report at the end.
Practice this as a mock interviewFree to start, no account neededProblem
You are given points, a list of integer coordinates [x, y] on a grid. Starting at points[0],
you must visit the points **in the given order**.
In one second you can move one unit horizontally, one unit vertically, or one unit diagonally (one
unit in both x and y at once). You may pass through later points early, but that does not count as
visiting them.
Return the minimum number of seconds needed to visit every point in order.
Examples
Constraints
- 1 <= points.length <= 100
- points[i].length == 2
- -1000 <= points[i][0], points[i][1] <= 1000
What the interviewer grades
A correct solution is one of five scores. The report also grades problem understanding (did you clarify inputs and edge cases before coding), problem solving, communication while you work, code quality, and testing. See a sample report, or read up on the pattern in the lessons.