#1815
Maximum Number of Groups Getting Fresh Donuts
master · 1665 · lc hard +32 · verified · 41.6% accepted · 356 likes · top 22%
Description
A donut shop bakes in batches of batchSize. Given groups[i] (group sizes), a group is happy if its first customer gets a fresh donut. You may arrange groups in any order. Return the maximum number of happy groups.
Code
1
2
3