quicksort/rank selection reimpl
min max heap to keep track of median
max sub array