Python two heap, easy to understand
\nfrom heapq import heappush, heappop\nclass MedianFinder:\n\n    def __init__(self):\n        self.maxheap = []   # Store the lower half\n        self.minheap 
```\nfrom heapq import heappush, heappop\nclass MedianFinder:\n\n    def __init__(self):\n        self.maxheap = []   # Store the lower half\n        self.minheap = []   # Store the larger half\n        \n\n    def addNum(self, num: int) -> None:\n        # maxheap length is either equal or 1 greater than minheap length\n        # always store negative value for maxheap\n        heappush(self.maxheap, -num)\n        \n        # Convert to positive when retrieving from maxheap\n        maxHeapTop = -heappop(self.maxheap)\n        \n        heappush(self.minheap, maxHeapTop)\n        \n        # Balance two heap\n        if len(self.minheap) > len(self.maxheap):\n            minHeapTop = heappop(self.minheap)\n            heappush(self.maxheap,-minHeapTop)  \n        \n    def findMedian(self) -> float:\n        if len(self.minheap) == len(self.maxheap):\n            return (self.minheap[0] + (-self.maxheap[0])) / 2\n        else:\n            return -self.maxheap[0]\n```
['Heap (Priority Queue)', 'Python', 'Python3']