# Next to the middle Given an array of integers, find *"the next to the middle"*. The next to the middle is the smallest integer greater than the smallest among mean, median and mode of the given numbers, that is neither the mean, median or mode and is also contained in the array. For example, in the following array ``` [ 7, 5, 2, 8, 0, 2, 9, 3, 5, 1, 2 ] Mean: 4 Median: 3 Mode: 2 ``` The next to the middle is `5`, because: * It's greater than 2 (the smallest of the three) * It is not any of the mean, median, mode * It's present in the given array * It's the smallest number matching the above requirements Another example, given this array ``` [ 2, 5, 1, 11, 0, 2, 12, 5, 1, 0, 5 ] Mean: 4 Median: 2 Mode: 5 ``` The next to the middle is `11`. This is [code-golf], the shortest wins. # Meta * Could the definition of "the next to the middle" be better reformulated? * Should the input array always have an odd number of integers, or could we allow two values for the median? * Should the input always give an integer mean, or should we take the floor() or round() of the mean, or should we instead just accept the floating point mean (after all it doesn't give problems) * Is there anything else to clarify? * What tags should I include? * Can you suggest a better name, possibly shorter, than "next to the middle"? * Do you have any suggestions to improve the challenge?