Search
⌘K

Leetcode 1755. Closest Subsequence Sum

Given an array of up to 40 integers and a target goal, find a subsequence whose sum minimizes the absolute difference to the goal. This is solved with a meet‑in‑the‑middle approach: enumerate subset sums for each half and efficiently combine them to find the closest sum.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.