일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- Python Code
- iterator
- Convert Sorted List to Binary Search Tree
- 밴픽
- 109. Convert Sorted List to Binary Search Tree
- 파이썬
- 30. Substring with Concatenation of All Words
- Python Implementation
- 시바견
- 315. Count of Smaller Numbers After Self
- Generator
- Python
- Regular Expression
- Decorator
- Substring with Concatenation of All Words
- shiba
- kaggle
- LeetCode
- concurrency
- 운영체제
- 프로그래머스
- Protocol
- 컴퓨터의 구조
- Class
- 715. Range Module
- t1
- 43. Multiply Strings
- data science
- DWG
- attribute
Archives
- Today
- Total
목록15. 3Sum (1)
Scribbling
LeetCode: 15. 3Sum
class Solution: def threeSum(self, nums: List[int]) -> List[List[int]]: nums.sort() N, ret = len(nums), [] for i in range(N): if i > 0 and nums[i] == nums[i-1]: continue target = -nums[i] l, r = i + 1, N - 1 while l target: r -= 1 else: l += 1 ..
Computer Science/Coding Test
2021. 8. 19. 21:52