
414 A Practical Guide to Data Structures and Algorithms Using Java
}
}
x.markDeleted(); //preserve Removed
x.prev.setNext(x.next); //preserve IterationList
size--; //preserve Size
return x.element;
}
Correctness Highlights: Since all nodes in T(root) except for node, are placed back into T(root),
REACHABLE is preserved. By the correctness of the internal methods used, HEAPORDERED is
preserved. By the correctness of removeFromList, moveChildrenToQueue, mergeQueue, and
merge, CHILDREN, PARENT, and SIBLINGCHAIN are preserved. By the correctness of the heap
node markDeleted method, REMOVED and REDIRECTCHAIN are preserved. Finally, the last
two lines preserve ...