Step 1: Calculate total sum = 1 + 5 + 11 + 5 = 22, target = 11
Total sum = 22, Target subset sum = 11
Why: We want to find a subset with sum 11 to confirm equal partition.
Step 2: Initialize boolean array dp[0..11] with dp[0] = true (sum 0 is always possible)
dp: [true, false, false, false, false, false, false, false, false, false, false, false]
Why: We start with sum 0 possible without any elements.
Step 3: Process number 1: update dp for sums including 1
dp: [true, true, false, false, false, false, false, false, false, false, false, false]
Why: Sum 1 is now possible by including the number 1.
Step 4: Process number 5: update dp for sums including 5
dp: [true, true, false, false, false, true, true, false, false, false, false, false]
Why: Sums 5 and 6 are possible by adding 5 to sums 0 and 1.
Step 5: Process number 11: update dp for sums including 11
dp: [true, true, false, false, false, true, true, false, false, false, false, true]
Why: Sum 11 is possible by adding 11 to sum 0.
Step 6: Process number 5: update dp for sums including 5 again
dp: [true, true, false, false, false, true, true, false, false, false, true, true]
Why: Sum 10 becomes possible by adding 5 to the previous sum 5.
Result: dp[11] = true means subset with sum 11 exists.
Final answer: true (partition possible)