feat: add rust codes for chapter greedy (#646)

* feat: add rust codes for chapter greedy

* Update max_product_cutting.rs

---------

Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
Night Cruising
2023-07-22 20:35:57 +08:00
committed by GitHub
parent abec926c24
commit 9d56622c75
5 changed files with 204 additions and 0 deletions
+20
View File
@@ -349,5 +349,25 @@ path = "chapter_divide_and_conquer/hanota.rs"
name = "build_tree"
path = "chapter_divide_and_conquer/build_tree.rs"
# Run Command: cargo run --bin coin_change_greedy
[[bin]]
name = "coin_change_greedy"
path = "chapter_greedy/coin_change_greedy.rs"
# Run Command: cargo run --bin fractional_knapsack
[[bin]]
name = "fractional_knapsack"
path = "chapter_greedy/fractional_knapsack.rs"
# Run Command: cargo run --bin max_capacity
[[bin]]
name = "max_capacity"
path = "chapter_greedy/max_capacity.rs"
# Run Command: cargo run --bin max_product_cutting
[[bin]]
name = "max_product_cutting"
path = "chapter_greedy/max_product_cutting.rs"
[dependencies]
rand = "0.8.5"