Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1058. Minimize Rounding Error to Meet Target
Given a list of decimal numbers and an integer target, choose for each number whether to round down or up to an integer so that the rounded sum equals the target while minimizing the total absolute rounding error (or report impossible). The core challenge is a feasibility check plus a combinatorial minimization that is resolved by selecting which values to ceil based on their fractional parts.
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.