Maximum Number of Groups Getting Fresh Donuts
You are given an integer array nums where nums[i] is the number of donuts in the ith box. You are also given an integer groupSize, the maximum size of each group.
You can choose any number of donuts from each box and distribute them among different groups. The groups are subjected to the following conditions:
Each group must have at least groupSize number of donuts. The total number of donuts in all the groups must be minimum. Return the maximum number of groups you can make.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)