Part 2
Part 2
Coding Question
https://www.youtube.com/@DebugWithShubham
https://www.linkedin.com/in/debugwithshubham/
https://www.instagram.com/debugwithshubham/
https://topmate.io/debugwithshubham
https://t.me/debugwithshubham
↑
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 the packet with minimum chocolates given to the
students is minimum.
Input 2: silent
Output:
Yes
Explanation
Listen and Silent are anagrams (an anagram is a word formed by rearranging the letters of the other word).
C++ JAVA
return 0;
}