본문 바로가기

해피 코딩!

검색하기
해피 코딩!
프로필사진 지속가능한 성장을

  • 분류 전체보기 (65)
    • Django (7)
    • Network (5)
    • Deploy (1)
    • AWS (1)
    • Git (2)
    • TDD (5)
    • 알고리즘 (32)
    • SQL (8)
    • OS (1)
    • Python (3)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
일 월 화 수 목 금 토
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
  • Bruteforce
  • ORM
  • 백준
  • pytest
  • Git
  • HTTP 완벽 가이드
  • TDD
  • SQL
  • was
  • Gunicorn
  • dictionary
  • postreSQL
  • permutations
  • AWS
  • Q objects
  • greedy
  • ws
  • stateless
  • Django
  • Query
  • stateful
  • codecov
  • Python
  • Programmers
  • utils
  • combinations
  • Stack
  • algorithm
  • Unit Testing
  • stack&que
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록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
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바