Q1. Magic Parent
A person X has M different flavor of candies(An array of size M was given with quantity of each candy of particular flavor) and there are N childrens, X has to distribute maximum number of candies among children and every child has the condition that it will only take candies of a particular flavor only ( it is also possible that child may not take any candy at all) and also the other children will get jealous if some children get maximum candies, you have to find the minimum jealously( maximum amount of candy given to a child/children ).
T.C:- N=7 M=5
flavors=[2,6,6,4,4];
ans:- 4
Disribution of candies was like :- 2,3,3,4,4,3,3