Skip to content

Commit 24c5889

Browse files
committed
Runtime: 1794 ms (Top 11.20%) | Memory: 13.8 MB (Top 87.90%)
1 parent 76459f4 commit 24c5889

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Runtime: 1794 ms (Top 11.20%) | Memory: 13.8 MB (Top 87.90%)
12
class Solution:
23
def countGoodTriplets(self, arr: List[int], a: int, b: int, c: int) -> int:
34
count = 0
@@ -6,4 +7,4 @@ def countGoodTriplets(self, arr: List[int], a: int, b: int, c: int) -> int:
67
for k in range(j+1,len(arr)):
78
if abs(arr[i]-arr[j])<=a and abs(arr[j]-arr[k])<=b and abs(arr[k]-arr[i])<=c:
89
count+=1
9-
return count
10+
return count

0 commit comments

Comments
 (0)