C# implementation of Median of Medians