We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f9ea47 commit 95b4270Copy full SHA for 95b4270
1001-1500/Minimum Time Visiting All Points.py
@@ -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