摘要: # 堆排序 def max_heap(heap,heapsize,i): # 构造最大堆(内部构建) left=2*i+1 right=2*i+2 larger=i if leftheap[larger]: larger=left if rightheap[larger]: larger=right if ... 阅读全文
posted @ 2019-08-18 20:31 reyinever 阅读(115) 评论(0) 推荐(0) 编辑