Use partial sort for Median and test.