Leetcode 1058. Minimize Rounding Error to Meet Target
Posted on Sun 02 March 2025 in Leetcode Premium • Tagged with greedy
Question Link : https://leetcode.com/problems/minimize-rounding-error-to-meet-target/
Difficulty: Medium
Premium: True
Question
Given an array of prices [p1,p2...,pn] and a target, round each price pi to Roundi(pi) so that the rounded array [Round1(p1),Round2(p2)...,Roundn(pn)] sums to the given target. Each operation Roundi(pi …
Continue reading