one Book a Day

  • 홈
  • 태그
  • 방명록
  • GitHub

permutations 1

[Python] itertools 순열, 조합 구현.

itertools라이브러리 combinations모듈과 permutations모듈을 통해 손쉽게 순열과 조합을 구할 수 있다. 이때 만들어진 순열,조합은 튜플형태로 리스트에 담겨서 반환된다. [(0,1,2),...] 조합 from itertools import combinations arr = [0, 1, 2, 3, 4, 5] print(list(combinations(arr, 3))) 순열 from itertools import permutations arr = [0, 1, 2, 3, 4, 5] print(list(permutations(arr, 3))) 재귀 기본적인 아이디어는 DFS,백트래킹과 유사하다. combination([0,1,2,3],2) = ([0],combination([1,2,3],1..

practivceAlgorithm/PYTHON 기능연습 2021.07.15
1
더보기
프로필사진
  • 분류 전체보기 (720)
    • webDeveloper (11)
      • Browser (5)
      • Test (1)
    • frontend (50)
      • HTML (6)
      • CSS&Design (14)
      • JavaScript (16)
      • TypeScript (2)
      • React (8)
      • 상태관리 (2)
      • d3.js & three.js (1)
    • backend (21)
      • Node.js (0)
      • Django&Python (15)
      • Java (2)
      • Spring Boot (0)
      • DB (4)
    • practivceAlgorithm (570)
      • 자료구조&알고리즘 (29)
      • PYTHON 기능연습 (11)
      • 백준 (379)
      • swexpertacademy (84)
      • programmers (23)
      • codeforce (20)
      • LeetCode (0)
      • 다시 봐야할 문제들 (22)
    • Computer Science (37)
      • 소프트웨어 공학 (9)
      • 네트워크 (10)
      • 운영체제 (7)
      • 컴퓨터 구조 (4)
      • DB (2)
      • 모델링 & 아키텍쳐 & 패턴 (3)
      • IOT (2)
    • GitHub&Git (7)
    • 후기 (3)
    • IDE (1)
    • Memo (1)

Tag

JS, 슬라이딩 윈도우, dfs, 비트마스크, 비트마스킹, 2018, 백준, codeforce 702, Python, DP, 파이썬, BOJ, 분할정복, kakao 2018, React, kakao 2019, JS 30, TRIE, 다익스트라, http,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

Archives

Calendar

«   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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바