You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
1.)Each student gets one packet.
2.)The difference between the number of chocolates in the packet with maximum chocolates and packet with minimum chocolates given to the students is minimum.