DP Experts Help Needed!!
Anonymous User
163

Problem Link: combinations-sum-iv
I'm practising DP problems and in this problem I'm struggling to break it down into subproblems. I'm not sure if I should break the nums array or I should break the target for the subproblems part.

1 . Currently I'm asking what are the total number of possible combinations in nums[1 - n] (the total nums array having n elements) for target.
2 . Should I say that, ok then tell me what are the total number of possible combinations in nums[1 - (n - i)] for target, basically in this step I'm breaking down the nums array.
3 . Should I say, tell me what are the total number of possible combinations in nums for target - i, in this one I'm breaking down the target number.

I'm having a hard time breaking down subproblems and how should I approach the problem, help would be highly appreciated!!!

Comments (0)