Added Median Heap that maintains the median element. Inserts can be done in time O(log n) and retrieving the median in time O(1).