Skip to content

Commit

Permalink
Update knapsack.ml
Browse files Browse the repository at this point in the history
  • Loading branch information
dhil authored Oct 23, 2024
1 parent 1d0105b commit c581e83
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/knapsack.ml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ let knapsack : int array -> int array -> int -> int
(* if w > c *)
(* then solver (i+1) n c *)
(* else *)
(* let option1 = solver (i + 1) n c in *)
(* let pn = ps.(i) in *)
(* let option2 = pn + solver (i + 1) n (c - w) in *)
(* max option1 option2 *)
(* let tt = ps.(i) + solver (i + 1) n (c - w) in *)
(* let ff = solver (i + 1) n c in *)
(* max tt ff *)
(* in *)
(* solver 0 (Array.length ps) cap *)

Expand Down

0 comments on commit c581e83

Please sign in to comment.