Adds knapsack algorithm

Untested