Find Median from Data Stream

 

295. Find Median from Data Stream

Solutions

  1. Keep 2 heap, one min_heap and one max_heap
  2. Let min_heap has at most 1 item more than max_heap
  3. The tops of two heaps will be the median of the whole list.