일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- LeetCode
- concurrency
- Protocol
- Python Implementation
- 시바견
- Class
- 43. Multiply Strings
- shiba
- Substring with Concatenation of All Words
- 109. Convert Sorted List to Binary Search Tree
- t1
- Convert Sorted List to Binary Search Tree
- 컴퓨터의 구조
- 30. Substring with Concatenation of All Words
- Decorator
- 파이썬
- kaggle
- Python
- iterator
- 715. Range Module
- data science
- 315. Count of Smaller Numbers After Self
- attribute
- 프로그래머스
- 운영체제
- DWG
- Generator
- 밴픽
- Regular Expression
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