摘要:
public class Heap{public static void main(String[] args){ Heap h=new Heap(); int[] heap=new int[]{1,2,3,4,5,6,7,8,9}; h.buildMaxHeap(heap); for(int i=0;i=0;i--){ maxHeap(heap,i,heap.length); }}public void maxHeap(int[] heap,int index,int len){ int left=(indexheap[largest]){... 阅读全文
posted @ 2013-12-18 16:18
血色舞
阅读(161)
评论(0)
推荐(0)

浙公网安备 33010602011771号