Given an array of N integers where each value represents the number of chocolates in a packet.
Each packet can have a variable number of chocolates.
There are m students, the task is to distribute chocolate packets such that:
Each student gets one packet.
The difference between the number of chocolates in the packet with maximum chocolates and the packet with minimum chocolates given to the students is minimum.
Copyright Notice
This problem is based on content
from GeeksforGeeks
written by GeeksforGeeks
and subject to GeeksforGeeks copyright.
The original content from GeeksforGeeks and any modifications made here are attributed to GeeksforGeeks contributors,
and this work is shared under CC BY-SA 4.0.