added knapsack.js