Concept Flow - Partition Equal Subset Sum
Calculate total sum of array
Check if total sum is odd?
Yes→Return False: cannot partition
No
Set target = total sum / 2
Use DP to check if subset sums to target
Return True if subset found, else False
We first find the total sum. If it's odd, partition is impossible. Otherwise, we try to find a subset with sum equal to half the total using dynamic programming.
