You are given an array of integers nums[] and an integer threshold. You must choose a positive integer divisor and divide each element in the array by it. The result of each division is rounded up to the nearest integer. Return the smallest divisor such that the sum of all the division results is less than or equal to the threshold.
Topics
Companies
Articles
Examples:
N/A
Constraints:
1 = nums.length = 5 × 104
1 = nums[i] = 106
nums.length = threshold = 106
Companies:
AppleSamsungVisaWalmart
Topics:
Binary Search
Please log in to access the Submissions tab, where you can review your progress and explore code submissions from other participants.
Please log in to access the Solution tab and view detailed answers and explanations.
Please log in to access the Discussion tab and join conversations with other participants.
Access Restricted: Please Login to access the code editor and test cases.