Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.