The challenge to find if the mean of an array is equal to the mode seems to be checking for the wrong thing. Isn't the mode the most frequently occurring element?
If so, it seems it is checking for the median rather than the mode. Try entering [1,1,2,4] into one of the correct answers. It will return 1 as if the mean and mode are the same. In this case, the mode is 1 and the mean is 2, so it should return 0. I was wondering why so many people had the mode defined as
posted this question on 8/16/14 |