We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53ce7c7 commit 9c694e9Copy full SHA for 9c694e9
contains-duplicate/wozlsla.py
@@ -0,0 +1,3 @@
1
+class Solution:
2
+ def containsDuplicate(self, nums: List[int]) -> bool:
3
+ return len(nums) > len(set(nums))
two-sum/wozlsla.py
@@ -0,0 +1,9 @@
+ def twoSum(self, nums: List[int], target: int) -> List[int]:
+ # idx를 따로 저장해두는 게 좋을까? X -> i를 사용하면 될듯
4
+ # 만약, 거꾸로 계산한다면?
5
+
6
+ for i in range(len(nums) - 1):
7
+ for j in range(i + 1, len(nums)):
8
+ if nums[i] + nums[j] == target:
9
+ return [i, j]
0 commit comments