Merge functionality from minmax into median. Max sorted array a global static
array for all users since we never operate multi-threaded