Skip to content
Algorithm.js
Frame

Dynamic Programming

상태 정의·전이·초기값을 구조화해 동적 계획법 사고 흐름을 빠르게 재현하기

Oct 2, 2025 — dynamic-programming
// base case
dp[0][0][...] = base case
// state transfer
for (const state1 of ALL_STATE1) {
for (const stat2 of ALL_STATE2) {
for (...) {
dp[state1][state2][....] = calc_max(choice1, choice2, ...);
}
}
}

기본 문제들

Reference