Minimizing Maximum Products Distributed To Any Store
Binary search finds smallest x where all products can be distributed without exceeding x per store.
2064. Minimized Maximum of Products Distributed to Any Store Difficulty: Medium Topics: Array, Binary Search You are given an integer n indicating there are n specialty retail stores. There are m product types of varying amounts, which are given as a 0-indexed integer array quantities, where quantities[i] represents the number of products of the ith product type. You need to distribute all products to the retail stores following these rules: A store can only be given at most one product type but can be given any amount of it. After distribution, each store will have been given some number of...