We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aaa8540 commit dc70471Copy full SHA for dc70471
scripts/algorithms/0-9/4Sum II/4Sum II.py
@@ -1,3 +1,4 @@
1
+# Runtime: 1360 ms (Top 29.95%) | Memory: 14.2 MB (Top 70.39%)
2
class Solution:
3
def fourSumCount(self, nums1: List[int], nums2: List[int], nums3: List[int], nums4: List[int]) -> int:
4
n1n2 = defaultdict(int)
@@ -11,4 +12,4 @@ def fourSumCount(self, nums1: List[int], nums2: List[int], nums3: List[int], num
11
12
ans = 0
13
for s in n1n2:
14
ans += n1n2[s] * n3n4[-s]
- return ans
15
+ return ans
0 commit comments