본문으로 건너뛰기
김신건의 로그

애니메이션

총 383개 · 8 / 16 페이지 · 169–192

본문 코드 펜스로 삽입: ```anim:<id>

태그로 필터 (697)
External Merge Sort, 메모리에 못 들어가는 정렬 11.0s

데이터를 메모리에 들어가는 청크 단위로 정렬해 디스크에 Run 으로 저장하고, K-way merge 로 한 번에 합쳐 출력한다.

🔢 알고리즘 external-merge-sort
19 elements · 6 chapters
#sort #external-sort #merge #spill
Fast I/O, 빠른 입출력 최적화 12.0s

cin/cout sync 해제, getchar_unlocked, mmap 으로 입출력 속도 30배 향상.

🔢 알고리즘 fast-io
23 elements · 5 chapters
#algorithm #optimization #io #performance
Fermat 소정리: 잉여계 순열 12.0s

p=7, a=3 예제. {1,2,3,4,5,6} × 3 (mod 7) = {3,6,2,5,1,4}. 일대일 대응으로 3^6 ≡ 1 (mod 7) 증명.

🔢 알고리즘 flt
28 elements · 7 chapters
#math #flt #number-theory #modular-arithmetic
FFT/NTT, 다항식 곱셈의 O(n log n) 구조 14.0s

두 다항식 A=[1,2,3], B=[4,5,6] 의 곱셈을 FFT/NTT 로. 계수→값(DFT)→점별 곱→계수(IDFT) 의 butterfly 단계 시각화. O(n log n) 컨볼루션.

🔢 알고리즘 fft-ntt
36 elements · 5 chapters
#algorithm #math #fft #ntt +1
Flood Fill (플러드 필) 12.0s

격자에서 BFS로 연결된 같은 색 영역을 새 색으로 칠하는 알고리즘

🔢 알고리즘 flood-fill
31 elements · 6 chapters
#flood-fill #bfs #grid #paint-bucket
Floor Sum 9.0s

Σ ⌊(ai+b)/m⌋ 의 기하적 해석과 O(log m) 계산

🔢 알고리즘 floor-sum
10 elements · 3 chapters
#floor-sum #math #number-theory
FWHT, XOR 컨볼루션의 O(N log N) 계산 13.0s

A=[1,2,3,4], B=[5,6,7,8]의 XOR 컨볼루션. XOR butterfly로 변환, 점별 곱셈, 역변환으로 O(N log N)에 c[k] = Σ_{i⊕j=k} a[i]·b[j] 계산.

🔢 알고리즘 fwht
11 elements · 5 chapters
#algorithm #math #fwht #xor +1
Gale-Shapley Stable Marriage 14.0s

N=4 stable matching with Gale-Shapley. Men propose to women by preference until all matched.

🔢 알고리즘 stable-marriage
13 elements · 5 chapters
#stable-marriage #matching #game #algorithm
General Graph Matching, Blossom 알고리즘 14.0s

일반 그래프에서 최대 매칭을 찾는 Edmond's Blossom 알고리즘: odd cycle 을 축약해 augmenting path 를 발견.

🔢 알고리즘 general-graph-matching
28 elements · 5 chapters
#algorithm #graph #matching #blossom +1
Grace Hash Join, Build 가 메모리에 안 들어갈 때 11.0s

두 테이블을 같은 해시 함수로 N 개 파티션에 분할한 뒤, 같은 번호의 파티션 쌍끼리 메모리에서 조인한다. 빌드가 메모리에 안 들어가도 작은 조각으로 나눠 처리할 수 있다.

🔢 알고리즘 grace-hash-join
18 elements · 7 chapters
#hash-join #grace-hash #partitioning #spill
Gradient Descent: 등고선 위 trajectory 12.5s

f(x,y)=x^2+2y^2 위 (3,2) 에서 시작, lr=0.1, 10 step trajectory.

🔢 알고리즘 gradient-descent
18 elements · 5 chapters
#gradient-descent #optimization #algorithm
Greedy, Activity Selection 14.0s

6개 구간을 종료 시각 순 정렬 후 greedy 선택. 충돌 없는 최대 개수 선택.

🔢 알고리즘 greedy
13 elements · 6 chapters
#greedy #foundation #algorithm
Green's Theorem, 폐곡선 적분 = 면적 적분 13.0s

Green 정리: 폐곡선 C 의 선적분이 내부 영역 D 의 이중 적분과 같음. 다각형 면적을 O(N) 에 계산하는 shoelace 공식의 기반.

🔢 알고리즘 green
12 elements · 4 chapters
#algorithm #geometry #calculus #green +1
Hackenbush, Blue-Red Chain Evaluation 13.0s

Chain B-B-R (Blue, Blue, Red) rising from ground. Each blue = +1, red = -1. Total = +1, Left wins.

🔢 알고리즘 hackenbush
7 elements · 5 chapters
#hackenbush #game #algorithm
Half-Plane Intersection 13.0s

반평면 4개 (y>=0, x>=0, x+y<=6, y<=x+2) 의 교집합을 각도 정렬 + deque 로 O(N log N) 에 구한다.

🔢 알고리즘 half-plane-intersection
18 elements · 5 chapters
#half-plane-intersection #geometry #algorithm
Hall 정리: 이분 매칭 조건 9.0s

왼쪽 집합 S의 모든 부분집합에 대해 |N(S)| ≥ |S|면 완전 매칭 존재

🔢 알고리즘 hall
13 elements · 4 chapters
#hall #bipartite-matching #graph
HashMap, 충돌 처리와 treeify 15.0s

HashMap 이 해시 충돌 시 linked list 로 체이닝하고, 한 버킷이 8개 이상이 되면 red-black tree 로 변환하는 과정.

🔢 알고리즘 java-hashmap-chaining
32 elements · 6 chapters
#java #hashmap #hash #chaining +1
Heap Sort, 힙에서 최댓값 추출 14.0s

배열을 max-heap 으로 만든 뒤, 루트(최댓값)를 끝으로 보내며 heap 크기를 줄여간다. In-place + O(n log n) 보장.

🔢 알고리즘 heap-sort
14 elements · 8 chapters
#heap-sort #sorting #heap #in-place
Heavy-Light Decomposition (HLD) 14.0s

Heavy 간선으로 트리를 O(log N) 체인으로 분할

🔢 알고리즘 hld
13 elements · 4 chapters
#tree #hld #decomposition #algorithm
Heuristics: Greedy, Local Search, Approximation 13.0s

Greedy (당장 최선), Local Search (이웃 개선), Approximation (OPT 대비 alpha 보장).

🔢 알고리즘 heuristics
16 elements · 4 chapters
#heuristics #optimization #algorithm
Hirschberg LCS, O(N) 공간 분할 정복 14.0s

ABCBDAB 와 BDCAB 의 LCS 를 Hirschberg 로. fwd/rev DP 행만 유지, 분할점 k=3 에서 재귀.

🔢 알고리즘 hirschberg
15 elements · 7 chapters
#algorithm #dp #lcs #divide-and-conquer +1
Insertion Sort, 카드 정렬하듯 13.0s

이미 정렬된 부분에 새 원소의 올바른 위치를 찾아 삽입. 작은 입력에 가장 빠른 O(n²) 정렬.

🔢 알고리즘 insertion-sort
9 elements · 7 chapters
#insertion-sort #sorting #education
Kinetic Segment Tree, 시간에 따라 변하는 최댓값 12.0s

각 원소가 일차함수 f(t) = m·t + b 로 변할 때, melt point (교차) 를 관리하며 최댓값을 O(log² N) 에 유지.

🔢 알고리즘 kinetic-segment-tree
12 elements · 4 chapters
#algorithm #data-structure #segment-tree #kinetic
KMP 문자열 매칭 11.8s

text='ABABABC' 에서 pattern='ABABC' 찾기. failure 함수로 mismatch 시 효율적 점프

🔢 알고리즘 kmp
39 elements · 8 chapters
#kmp #string-matching #algorithm

사이트 검색 / 명령어

검색

스크롤 = 확대/축소 · 드래그 = 이동 · 0 = 원래 크기 · ESC = 닫기