Module Expr Str Import alias Assign NameStore Str ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr CompareGt NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr UnaryOpUSub NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareGt BinOpSub NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr UnaryOpUSub Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr orelse If CompareGt BinOpSub NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr UnaryOpUSub Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpDiv BinOpSub BinOpAdd NameLoad NameLoad Num Num If CompareEq BinOpMod BinOpAdd NameLoad NameLoad Num Num body If CompareEq NameLoad BinOpSub NameLoad Num body Return UnaryOpUSub SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Return SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Return BinOpDiv BinOpAdd UnaryOpUSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Num decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A N/A 
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the
median is the mean of the two middle value.

Examples:
[2,3,4] , the median is 3

[2,3], the median is (2 + 3) / 2 = 2.5

Design a data structure that supports the following two operations:

void addNum(int num) - Add a integer number from the data stream to the data structure.
double findMedian() - Return the median of all elements so far.
For example:

add(1)
add(2)
findMedian() -> 1.5
add(3)
findMedian() -> 2
 N/A heapq N/A __author__ Daniel DualHeap N/A object N/A __init__ N/A N/A self N/A N/A N/A 
        Dual Heap is great in the case where there is no removal.
        :return:
         N/A N/A self min_h N/A N/A N/A self max_h N/A N/A insert N/A N/A self num N/A N/A N/A N/A N/A N/A self min_h N/A num N/A N/A self min_h N/A 0 N/A N/A N/A N/A heapq heappush N/A self min_h num N/A N/A N/A N/A heapq heappush N/A self max_h N/A num N/A N/A N/A self balance N/A balance N/A N/A self N/A N/A N/A l1 N/A len N/A self min_h N/A l2 N/A len N/A self max_h N/A N/A N/A l1 l2 1 N/A N/A N/A N/A heapq heappush N/A self max_h N/A N/A N/A heapq heappop N/A self min_h N/A N/A N/A self balance N/A N/A N/A N/A l2 l1 1 N/A N/A N/A N/A heapq heappush N/A self min_h N/A N/A N/A heapq heappop N/A self max_h N/A N/A N/A self balance N/A N/A get_median N/A N/A self N/A N/A N/A l1 N/A len N/A self min_h N/A l2 N/A len N/A self max_h N/A m N/A N/A N/A l1 l2 1 2 N/A N/A N/A N/A l1 l2 2 1 N/A N/A N/A m N/A l2 1 N/A N/A N/A N/A N/A self max_h N/A 0 N/A N/A N/A N/A self min_h N/A 0 N/A N/A N/A N/A N/A N/A N/A self max_h N/A 0 N/A N/A self min_h N/A 0 2.0 N/A N/A MedianFinder N/A object N/A __init__ N/A N/A self N/A N/A N/A 
        Initialize your data structure here.
         N/A N/A self dh N/A DualHeap N/A addNum N/A N/A self num N/A N/A N/A 
        Adds a num into the data structure.
        :type num: int
        :rtype: void
         N/A N/A N/A N/A self dh insert num N/A findMedian N/A N/A self N/A N/A N/A 
        Returns the median of current data stream
        :rtype: float
         N/A N/A N/A N/A self dh get_median N/A N/A