Course Solutions Uncategorized (Solved) : Knapsak Problem Please Help Java Code Please Help Help Want Add Small Edit Another Limitat Q38103617 . . . .

(Solved) : Knapsak Problem Please Help Java Code Please Help Help Want Add Small Edit Another Limitat Q38103617 . . . .

 

knapsak Problem Please Help

Java Code , Please Help

HELP

i just want to add a small edit : we have another limitation:the number of items may be a given k∈ N do not exceed!

Here is my Code :

in my Code there is a problem :

Profit is not optimal (the output should be :100 ,expected: 100,produced: 74)

but i become 74

can you Help me please

public class Knapsack {
   public static int pack(Itema[] items, int capacity,int maxItems) {
  
   int K[][] = new int[maxItems + 1][capacity + 1];
   for (int i = 0; i<= maxItems; i++) {
   for (int w = 0; w<= capacity; w++) {
  

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post