---
title: 'Partition Equal Subset Sum Explained | Dynamic Programming (Subset Sum Pattern)'
source: 'https://youtube.com/watch?v=HUY_YZX9oWs'
video_id: 'HUY_YZX9oWs'
date: 2026-08-04
duration_sec: 73
---

# Partition Equal Subset Sum Explained | Dynamic Programming (Subset Sum Pattern)

> Source: [Partition Equal Subset Sum Explained | Dynamic Programming (Subset Sum Pattern)](https://youtube.com/watch?v=HUY_YZX9oWs)

## Summary

This video explains how to solve the 'Partition Equal Subset Sum' problem using dynamic programming. It demonstrates the subset sum pattern by tracking all possible sums and checking if a target sum can be achieved.

### Key Points

- **Problem Introduction** [00:03] — Given an array, determine if it can be split into two groups with equal sum. Example: [8,2,4,7,3,6].
- **Reduce to Subset Sum** [00:17] — Total sum is 30, so each group must sum to 15. The problem becomes: can we make 15 using some numbers from the array?
- **DP Approach** [00:31] — Track every sum we can build. Start with sum 0. For each number, consider taking or skipping it, updating the set of possible sums.
- **Example Walkthrough** [00:46] — After processing 8,2,4,7, we get sums including 15 (8+7), so return true. This demonstrates dynamic programming building new answers from previous ones.
- **Conclusion** [01:01] — Subset sum problems become easy with DP. The video promotes Hello Interview for interactive visualizations.

### Conclusion

The video effectively explains the subset sum DP pattern, showing how to reduce the partition problem to a target sum check and solve it efficiently.

## Transcript

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
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
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
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
problems become easy. Learn more problems like this from interactive visualizations on Hello Interview and follow us for more.
