mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-14 04:30:58 +00: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_greedy;
|
||||
|
||||
public class max_product_cutting {
|
||||
/* 最大切分乘积:贪心 */
|
||||
public int MaxProductCutting(int n) {
|
||||
int MaxProductCutting(int n) {
|
||||
// 当 n <= 3 时,必须切分出一个 1
|
||||
if (n <= 3) {
|
||||
return 1 * (n - 1);
|
||||
|
||||
Reference in New Issue
Block a user