Search
⌘K
Get Premium
Leetcode 3512. Minimum Operations to Make Array Sum Divisible by K
Find the minimum number of single-unit decrements (each replaces nums[i] with nums[i]-1) needed to make the array sum divisible by k — since each operation reduces the total sum by 1, the answer equals sum(nums) % k (0 if already divisible).
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.