Code not working tilling problem II

Apply DP (memoization)