(self, x)
Pushes a new element.
Pushes a new element.
Pushes a new element .
def push(self, x):
    """Pushes a new element."""
    assert self._data is not None
    if len(self._data) < self._n:
      heapq.heappush(self._data, x)
    else:
      heapq.heappushpop(self._data, x)
def push ( self , x ) : assert self . _data is not None if len ( self . _data ) < self . _n : heapq . heappush ( self . _data , x ) else : heapq . heappushpop ( self . _data , x )