Search
⌘K

Leetcode 1283. Find the Smallest Divisor Given a Threshold

Find the minimum positive integer divisor d such that the sum of ceil(nums[i]/d) over all elements is ≤ threshold. The sum is monotone decreasing in d, so this is a typical “binary search on the answer” problem over d in [1, max(nums)].


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.