摘要: 用堆排序找出list中第K小的数字, 用小顶堆 python3 def min_heap_k(nums, topk): def siftdown(nums, e, begin, end): i = begin j = 2 i + 1 while j = right: return None i = 阅读全文
posted @ 2018-05-02 18:43 一条图图犬 阅读(522) 评论(0) 推荐(0) 编辑