mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 21:24:53 +08:00
feat(csharp) .NET 8.0 code migration (#966)
* .net 8.0 migration * update docs * revert change * revert change and update appendix docs * remove static * Update binary_search_insertion.cs * Update binary_search_insertion.cs * Update binary_search_edge.cs * Update binary_search_insertion.cs * Update binary_search_edge.cs --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@ -8,7 +8,7 @@ namespace hello_algo.chapter_dynamic_programming;
|
||||
|
||||
public class coin_change {
|
||||
/* 零钱兑换:动态规划 */
|
||||
public int CoinChangeDP(int[] coins, int amt) {
|
||||
int CoinChangeDP(int[] coins, int amt) {
|
||||
int n = coins.Length;
|
||||
int MAX = amt + 1;
|
||||
// 初始化 dp 表
|
||||
@ -33,7 +33,7 @@ public class coin_change {
|
||||
}
|
||||
|
||||
/* 零钱兑换:空间优化后的动态规划 */
|
||||
public int CoinChangeDPComp(int[] coins, int amt) {
|
||||
int CoinChangeDPComp(int[] coins, int amt) {
|
||||
int n = coins.Length;
|
||||
int MAX = amt + 1;
|
||||
// 初始化 dp 表
|
||||
@ -57,7 +57,7 @@ public class coin_change {
|
||||
|
||||
[Test]
|
||||
public void Test() {
|
||||
int[] coins = { 1, 2, 5 };
|
||||
int[] coins = [1, 2, 5];
|
||||
int amt = 4;
|
||||
|
||||
// 动态规划
|
||||
|
||||
Reference in New Issue
Block a user