일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 715. Range Module
- shiba
- Python
- 315. Count of Smaller Numbers After Self
- 30. Substring with Concatenation of All Words
- LeetCode
- Python Code
- kaggle
- 파이썬
- 43. Multiply Strings
- Generator
- Regular Expression
- 밴픽
- 시바견
- concurrency
- attribute
- Substring with Concatenation of All Words
- Python Implementation
- t1
- DWG
- Protocol
- data science
- 운영체제
- 컴퓨터의 구조
- Convert Sorted List to Binary Search Tree
- 109. Convert Sorted List to Binary Search Tree
- 프로그래머스
- iterator
- Class
- Decorator
Archives
- Today
- Total
목록Combination Sum (1)
Scribbling
39. Combination Sum
class Solution: def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]: ret = [] arr = [0] self.helper(ret, arr, candidates, target) return ret def helper(self, ret, arr, candidates, target): _sum = sum(arr) if _sum > target: return if _sum == target: ret.append(arr[1:]) return for candidate in candidates: last_input = arr[-1] if candidate >= last_input: next_arr = arr.c..
Computer Science/Coding Test
2021. 9. 4. 19:31