Skip to content

Commit 95b4270

Browse files
committed
1266
1 parent 4f9ea47 commit 95b4270

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def minTimeToVisitAllPoints(self, points: List[List[int]]) -> int:
3+
total_time = 0
4+
for i in range(1, len(points)):
5+
x1, y1 = points[i - 1]
6+
x2, y2 = points[i]
7+
total_time+=max(abs(x2 - x1), abs(y2 - y1))
8+
return total_time

0 commit comments

Comments
 (0)