Chocolate Problem Python
PROGRAM TO SOLVE CHOCOLATE DISTRIBUTION PROBLEM
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 packet with minimum chocolates given to the students is minimum.
OUTPUT
Minimum difference is 10
Comments
Post a Comment