Get your own website
Python
C
Java
 
Python result:
C result:
Java result:
knapsack_brute_force(10,4)
knapsack_brute_force(7,3)
knapsack_brute_force(2,2)
knapsack_brute_force(1,1)
knapsack_brute_force(1,0)
knapsack_brute_force(2,1)
knapsack_brute_force(0,0)
knapsack_brute_force(2,0)
knapsack_brute_force(7,2)
knapsack_brute_force(6,1)
knapsack_brute_force(4,0)
knapsack_brute_force(6,0)
knapsack_brute_force(7,1)
knapsack_brute_force(5,0)
knapsack_brute_force(7,0)
knapsack_brute_force(10,3)
knapsack_brute_force(5,2)
knapsack_brute_force(4,1)
knapsack_brute_force(2,0)
knapsack_brute_force(4,0)
knapsack_brute_force(5,1)
knapsack_brute_force(3,0)
knapsack_brute_force(5,0)
knapsack_brute_force(10,2)
knapsack_brute_force(9,1)
knapsack_brute_force(7,0)
knapsack_brute_force(9,0)
knapsack_brute_force(10,1)
knapsack_brute_force(8,0)
knapsack_brute_force(10,0)

Maximum value in Knapsack = 1200
knapsack_brute_force(10,4)
knapsack_brute_force(7,3)
knapsack_brute_force(2,2)
knapsack_brute_force(1,1)
knapsack_brute_force(1,0)
knapsack_brute_force(2,1)
knapsack_brute_force(0,0)
knapsack_brute_force(2,0)
knapsack_brute_force(7,2)
knapsack_brute_force(6,1)
knapsack_brute_force(4,0)
knapsack_brute_force(6,0)
knapsack_brute_force(7,1)
knapsack_brute_force(5,0)
knapsack_brute_force(7,0)
knapsack_brute_force(10,3)
knapsack_brute_force(5,2)
knapsack_brute_force(4,1)
knapsack_brute_force(2,0)
knapsack_brute_force(4,0)
knapsack_brute_force(5,1)
knapsack_brute_force(3,0)
knapsack_brute_force(5,0)
knapsack_brute_force(10,2)
knapsack_brute_force(9,1)
knapsack_brute_force(7,0)
knapsack_brute_force(9,0)
knapsack_brute_force(10,1)
knapsack_brute_force(8,0)
knapsack_brute_force(10,0)

Maximum value in Knapsack = 1200
knapsack_brute_force(10,4)
knapsack_brute_force(7,3)
knapsack_brute_force(2,2)
knapsack_brute_force(1,1)
knapsack_brute_force(1,0)
knapsack_brute_force(2,1)
knapsack_brute_force(0,0)
knapsack_brute_force(2,0)
knapsack_brute_force(7,2)
knapsack_brute_force(6,1)
knapsack_brute_force(4,0)
knapsack_brute_force(6,0)
knapsack_brute_force(7,1)
knapsack_brute_force(5,0)
knapsack_brute_force(7,0)
knapsack_brute_force(10,3)
knapsack_brute_force(5,2)
knapsack_brute_force(4,1)
knapsack_brute_force(2,0)
knapsack_brute_force(4,0)
knapsack_brute_force(5,1)
knapsack_brute_force(3,0)
knapsack_brute_force(5,0)
knapsack_brute_force(10,2)
knapsack_brute_force(9,1)
knapsack_brute_force(7,0)
knapsack_brute_force(9,0)
knapsack_brute_force(10,1)
knapsack_brute_force(8,0)
knapsack_brute_force(10,0)

Maximum value in Knapsack = 1200