Deletes the node or heap element at the specified index in the heap. The item at the specified node is returned.
If the item to delete is the last one, delete it and shrink the tree, the tree will still be a heap. Otherwise, delete replace the item with the lowest, rightmost item in the heap and "reheapify".
Namespace: DataStructures
Delphi |
public |
Parameters
Index
Type: Integer
Type: TObject