일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- shiba
- Substring with Concatenation of All Words
- Regular Expression
- DWG
- iterator
- data science
- Python Implementation
- 30. Substring with Concatenation of All Words
- kaggle
- t1
- LeetCode
- 운영체제
- Protocol
- Decorator
- Generator
- 715. Range Module
- Class
- Python
- concurrency
- 시바견
- Python Code
- 315. Count of Smaller Numbers After Self
- 파이썬
- Convert Sorted List to Binary Search Tree
- 컴퓨터의 구조
- 109. Convert Sorted List to Binary Search Tree
- 프로그래머스
- 밴픽
- attribute
- 43. Multiply Strings
Archives
- Today
- Total
목록permutations (1)
Scribbling
LeetCode: 46. Permutations
DFS Solution. from itertools import permutations class Solution: def permute(self, nums: List[int]) -> List[List[int]]: # Using Library # return list(permutations(nums, len(nums))) ret = [] self.helper(nums, [], ret) return ret def helper(self, nums, element, ret): if not nums: ret.append(element) for i, num in enumerate(nums): self.helper(nums[:i]+nums[i+1:], element+[num], ret) A lazy solution..
Computer Science/Coding Test
2021. 9. 7. 21:30