Files
Yudong Jin 2f561d3d51 feat(ko): add the Korean online edition (#2006)
* feat(ko): add the complete Korean online edition

* Use UTF-8 for Python CI output on Windows

* Remove print-book promotion from the Korean site

* fix(ko): preserve emphasis before Korean particles
2026-10-29 03:46:43 +08:00

24 lines
563 B
Go

// File: coin_change_test.go
// Created Time: 2023-07-23
// Author: Reanon ([email protected])
package chapter_dynamic_programming
import (
"fmt"
"testing"
)
func TestCoinChange(t *testing.T) {
coins := []int{1, 2, 5}
amt := 4
// 동적 계획법
res := coinChangeDP(coins, amt)
fmt.Printf("목표 금액을 만드는 데 필요한 최소 동전 개수는 %d이다\n", res)
// 공간을 최적화한 동적 계획법
res = coinChangeDPComp(coins, amt)
fmt.Printf("목표 금액을 만드는 데 필요한 최소 동전 개수는 %d이다\n", res)
}