adds problem set 8 (memoization, optimization)