Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Django
- Stack
- HTTP 완벽 가이드
- Unit Testing
- TDD
- ORM
- Query
- Programmers
- Git
- utils
- pytest
- Python
- combinations
- 백준
- Gunicorn
- stateless
- AWS
- permutations
- stack&que
- SQL
- dictionary
- stateful
- greedy
- Bruteforce
- Q objects
- codecov
- algorithm
- postreSQL
- was
- ws
Archives
- Today
- Total
목록combinations (1)
해피 코딩!
순열과 조합 - combinations, permutations
조합 조합이란 n개의 원소를 사용해서 순서의 관계없이 r개의 배열로 나타내는 것을 말한다. 조합은 순서가 없어 원소의 종류가 같으면 다같은 배열로 나타낸다. combinations python combinations 공식문서 def combinations(iterable, r): # combinations('ABCD', 2) --> AB AC AD BC BD CD # combinations(range(4), 3) --> 012 013 023 123 pool = tuple(iterable) n = len(pool) if r > n: return indices = list(range(r)) yield tuple(pool[i] for i in indices) while True: for i in..
알고리즘
2020. 12. 19. 13:12