Question: In this question we'd like to solve a holiday problem as it is appropriate for this time of year. Let's say you're given an integer


In this question we'd like to solve a holiday problem as it is appropriate for this time of year. Let's say you're given an integer array cookies where each elements shows the number of cookies in each bag (the length of array is the number of bags of cookies we have). And we'd like to distribute these cookie bags between nChildren children. There's one rule here. You cannot open a bag and split its content. All the cookies in one bag must go to only one child. The unfairness of a distribution is defined as the standard deviation of distributed cookies calculated by the following formula: i=N std = i= 1 (x; - mean) E N Where N is the number of elements in X
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
