top_k
a = []
k = 6
heapq.heapify(a)
heapq.heappush(a, ele)
heapq.heappop(a)
heapq.heareplace(a, ele)
heapq.heappushpop(a, ele)
top_k
a = []
k = 6
heapq.heapify(a)
heapq.heappush(a, ele)
heapq.heappop(a)
heapq.heareplace(a, ele)
heapq.heappushpop(a, ele)