Skip to content

Instantly share code, notes, and snippets.

@Ifihan
Created December 30, 2021 01:14
Show Gist options
  • Save Ifihan/013aa02b252e6f8071881b534cfedcde to your computer and use it in GitHub Desktop.
Save Ifihan/013aa02b252e6f8071881b534cfedcde to your computer and use it in GitHub Desktop.
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
for i in range(len(nums) - 1):
for j in range(i + 1, len(nums)):
if nums[i] + nums[j] == target:
return i,j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment