Recent posts

itertools

less than 1 minute read

import itertools accumulate( iterable, [ func, *, initial=None ] ): 누적합 permutations( iterable, r=None ): 순열 product( *iterables, repeat=1 ), 곱집합 or 카...

DFS, BFS

less than 1 minute read

DFS 깊이 우선 탐색 그래프의 시작 노드 부터 스택에 넣고 빼면서 탐색

그래프

less than 1 minute read

그래프 노드에서 노드까지의 연결을 나타낸 자료구조 1번노드와 2번노드가 연결되어있다면 arr[1][2] = TRUE 형식으로 나타나짐

이진 탐색, 정렬

less than 1 minute read

이진 탐색 def binary_serach(arr, target, mn, mx): while mn <= mx: mid = (mn + mx) // 2 if arr[mid] == target: return mid elif...