Untitled

mail@pastecode.io avatar
unknown
python
a year ago
251 B
2
Indexable
Never
class Solution:
    def twoSum(self, nums: list, target: int) -> list:
    
        n = 0
        for n in range(len(nums)):
            for m in range(n+1, len(nums)):

                if nums[n] + nums[m] == target:
                    return [n, m]