js: look up table for knapsack problem (work in progress)