Feature/chapter greedy swift (#720)

* feat: add Swift codes for greedy_algorithm article

* feat: add Swift codes for fractional_knapsack_problem article

* feat: add Swift codes for max_capacity_problem article

* feat: add Swift codes for max_product_cutting_problem article
This commit is contained in:
nuomi1
2023-09-03 19:09:45 +08:00
committed by GitHub
parent dd72335235
commit 8d5e84f70a
5 changed files with 202 additions and 0 deletions
+10
View File
@@ -93,6 +93,11 @@ let package = Package(
.executable(name: "coin_change", targets: ["coin_change"]),
.executable(name: "coin_change_ii", targets: ["coin_change_ii"]),
.executable(name: "edit_distance", targets: ["edit_distance"]),
// chapter_greedy
.executable(name: "coin_change_greedy", targets: ["coin_change_greedy"]),
.executable(name: "fractional_knapsack", targets: ["fractional_knapsack"]),
.executable(name: "max_capacity", targets: ["max_capacity"]),
.executable(name: "max_product_cutting", targets: ["max_product_cutting"]),
],
targets: [
// helper
@@ -187,5 +192,10 @@ let package = Package(
.executableTarget(name: "coin_change", path: "chapter_dynamic_programming", sources: ["coin_change.swift"]),
.executableTarget(name: "coin_change_ii", path: "chapter_dynamic_programming", sources: ["coin_change_ii.swift"]),
.executableTarget(name: "edit_distance", path: "chapter_dynamic_programming", sources: ["edit_distance.swift"]),
// chapter_greedy
.executableTarget(name: "coin_change_greedy", path: "chapter_greedy", sources: ["coin_change_greedy.swift"]),
.executableTarget(name: "fractional_knapsack", path: "chapter_greedy", sources: ["fractional_knapsack.swift"]),
.executableTarget(name: "max_capacity", path: "chapter_greedy", sources: ["max_capacity.swift"]),
.executableTarget(name: "max_product_cutting", path: "chapter_greedy", sources: ["max_product_cutting.swift"]),
]
)