Time: 4529 ms (18.18%), Space: 14.5 MB (9.11%) - LeetHub

This commit is contained in:
Deven
2022-07-12 12:56:24 -04:00
parent ebd7b47223
commit 5c962d3f69
+3 -2
View File
@@ -5,7 +5,8 @@ class Solution(object):
:type target: int
:rtype: List[int]
"""
for i in range(len(nums)):
for j in range(i + 1, len(nums)):
length = len(nums)
for i in range(length):
for j in range(i + 1, length):
if nums[i] + nums[j] == target:
return [i, j]