0-1 Knapsack Problem

Getting TLE in two testcases

@aiman.mumtaz
you have to memoize your solution.
i.e saving the ans of each state, so as to avoid calculating them again.