FInds the median in a stream of integers