IT_World
[leetcode]77. Combinations 본문
class Solution:
def combine(self, n: int, k: int) -> List[List[int]]:
rnglst = list(range(1,n+1))
cmblst = list(combinations(rnglst, k))
return cmblst
'Coding test > programmers - single' 카테고리의 다른 글
[leetcode] 70. Climbing Stairs (0) | 2022.04.02 |
---|---|
[leetcode] 39. Combination Sum (0) | 2022.04.01 |
[leetcode]78. Subsets (0) | 2022.03.30 |
[leetcode] 22. Generate Parentheses (0) | 2022.03.29 |
[leetcode] 67. Add Binary (0) | 2022.03.27 |
Comments