Fully implemented the memory-efficient Knapsack DP algorithm. Some hacks used.