public static void main(String[] args) {
		int[] heap = new int[] { 1, 3, 7, 5, 2, 8, 4, 6, 10, 9 };
		int temp;
		printArray(heap);
		createHeap(heap); //创建堆（对该堆进行简单的排序）
		printArray(heap);
		for (int i = heap.length - 1; i > 0; i--) {
			temp = heap[0];
			heap[0] = heap[i];
			heap[i] = temp;
			printArray(heap);
			adjustHeap(heap, 0, i); //从堆顶进行调整，使未排序堆中最大关键字到堆顶
		}
	}