Search
⌘K

Leetcode 1774. Closest Dessert Cost

Pick exactly one base and 0–2 of each topping to form a total cost as close as possible to a given target (ties favor the lower sum). With n,m ≤ 10 this is a bounded-combination/knapsack-style search problem solvable by brute-force/backtracking or DP over achievable sums.


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.