Heap::top

(Available since version 1.0)

Heap::topPeeks at the node from the top of the heap

Description

public mixed Heap::top ( void )

Returns the value at the top of the heap without removing it. Runs in Θ(1) amortized time.

Parameters

This function has no parameters.

Return Values

The value of the node on the top.

Errors/Exceptions

Throws SEIDS::Heaps::PeekException when the data-structure is empty.

See Also

To Top