code: func getTopK(queue []interface{}, id *bitmap, k int) []interface{} {
  	topkHeap := make(topKHeap, 0, k+1)
  
  	for _, value := range queue {
  		node := value.(*node)
  		distance := id.Xor(node.id)
  		if topkHeap.Len() == k {
  			var last = topkHeap[topkHeap.Len() - 1]
  			if last.distance.Compare(distance, maxPrefixLength) == 1 {
  				item := &heapItem{
  					distance,
  					value,
  				}
  				heap.Push(&topkHeap, item)
  				heap.Pop(&topkHeap)
  			}
  		} else {
  			item := &heapItem{
  				distance,
  				value,
  			}
  			heap.Push(&topkHeap, item)
  		}
  	}
  
  	tops := make([]interface{}, topkHeap.Len())
  	for i := len(tops) - 1; i >= 0; i-- {
  		tops[i] = heap.Pop(&topkHeap).(*heapItem).value
  	}
  
  	return tops
  }
docs: // getTopK solves the top-k problem with heap. It's time complexity is
  // O(n*log(k)). When n is large, time complexity will be too high, need to be
  // optimized.