Finish q2

Completed knapsack_smart method which determines which values of w from
w = 0 … knapsack_size are actually used in subproblems for calculating
the maximum value that can fit in the knapsack.