堆积
第八章堆积
maxsize 1) • return 0。 • ++(heaplast)。 • ++(heapsize)。 • heapdata[heaplast] = dataptr。 • ReheapUp(heap, heaplast)。 • return 1。 • } 插入堆積 • void ReheapUp(struct heapTag *heap, int child) • { • int
maxsize 1) • return 0。 • ++(heaplast)。 • ++(heapsize)。 • heapdata[heaplast] = dataptr。 • ReheapUp(heap, heaplast)。 • return 1。 • } 插入堆積 • void ReheapUp(struct heapTag *heap, int child) • { • int