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 | 31 |
Tags
- geometry
- Counting
- java
- Data Structure
- array
- 코딩테스트
- dynamic programming
- Binary Search
- 코테
- Class
- Method
- Number Theory
- Binary Tree
- Math
- greedy
- simulation
- Matrix
- 파이썬
- string
- Stack
- 자바
- sorting
- bit manipulation
- Tree
- hash table
- SQL
- two pointers
- implement
- database
- 구현
Archives
- Today
- Total
코린이의 소소한 공부노트
Dynamic Programming 본문
1. 전략: bottom-up approach
1) 문제의 가장 작은 단위부터 사용할 수 있는 반복문을 작성한다.
2) 가장 작은 문제부터 차례대로 풀어나간다.
3) 저장된 결과를 재사용한다.
3) divide and conquer와의 공통점
- 문제를 작게 쪼개서 해결한다.
4) divide and conquer와의 차이점
- DAC의 경우 top-down 형식이기 때문에 중복 계산이 여러 개 생겨날 수 있다.
- DP는 bottom-up 형식이기 때문에 중복 계산이 생기지 않는다.
2. 예시
- binomial coefficient
- Floyd's algorithm for shortest paths
- traveling salesperson problem
- chained matrix multiplication
- optimal binary search trees
- sequence alignment
'Back-End > Algorithm' 카테고리의 다른 글
Binomial Coefficient (iterative) (0) | 2023.03.07 |
---|---|
Binomial Coefficient (recursive) (0) | 2023.03.07 |
Strassen's Matrix Multiplication Algorithm (no example) (0) | 2023.03.03 |
Quick Sort (partition exchange sort) (0) | 2023.03.02 |
Merge Sort (recursive, less memory, in-place) (0) | 2023.02.24 |