(NOTE: I am dividing the array into sub-arrays containing 5 elements in my example)
I understand that the median-of-medians algorithms splits the n-input array into floor(n/5) groups with an additional group-containing (n)mod5 elements and then finds the median element of each sorted group (the 3rd element in groups with 5 elements) and so on.
My question is if one of the groups had 2 or 4 elements, which element would be chosen as the median of that group (assuming that the group has already been sorted).