Median of two Sorted arrays—Heap solution