Target Sum
Medium
Dynamic Programming
Assign '+' or '-' to every number in an array so the total equals target. Print the number of ways.
Constraints
1 <= n <= 20 0 <= nums[i] <= 1000 sum(nums) <= 1000
Discussion
No discussions yet.
Join Shalyam Newsletter
Get exclusive insights with every issue: education, research and innovation news.
Shalyam Support
Hi! Ask us anything โ we'll reply on WhatsApp or Telegram within 24 hours.