[00:03] you see the trick. You're given an array. Can you split it into two groups with equal sum? Take this example. 8 2 4 7 3 6. Most people will try all combinations and that increases exponentially. It's a good sign there's [00:17] a possible DP solution. A better option is to think like this. First, find the is to think like this. First, find the total sum. It's 30. So, each group must sum to 15. Now, the problem reduces to can I make 15 using some numbers from [00:31] the array? We'll track every sum we can build. When we start, nothing is picked yet. So, the only sum is zero. Then, we can consider eight. Take it or skip it. Our sums become zero and eight. Next, two. Add it to each sum, we get 0 2 8 [00:46] and 10. Next, four. Add it again. Now, we have eight possible sums. Now, seven. 8 + 7 is 15. That's our target. So, we can return true. This is dynamic programming. At each step, you build new answers from previous ones. Subset [01:01] problems become easy. Learn more problems like this from interactive visualizations on Hello Interview and follow us for more.