Skip to content

Commit ce078c8

Browse files
committed
Runtime: 75 ms (Top 33.45%) | Memory: 13.7 MB (Top 99.77%)
1 parent 9142ce7 commit ce078c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/T/Two Furthest Houses With Different Colors/Two Furthest Houses With Different Colors.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Runtime: 75 ms (Top 33.45%) | Memory: 13.7 MB (Top 99.77%)
12
class Solution:
23
def maxDistance(self, colors: List[int]) -> int:
34
p, res = inf, 0
@@ -7,4 +8,4 @@ def maxDistance(self, colors: List[int]) -> int:
78
p = min(p, i)
89
else:
910
res = max(res, i - p)
10-
return res
11+
return res

0 commit comments

Comments
 (0)