Closest Subset Sum to Goal
Hard
Meet in the Middle
Choose any subset (possibly empty) so its sum is as close as possible to goal. Print the minimum absolute difference.
Constraints
1 <= n <= 40 |nums[i]| <= 10^7 |goal| <= 10^9
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.