Heap::insert

(Available since version 1.0)

Heap::insertInserts an element in the heap

Description

public bool Heap::insert ( mixed $value )

Insert value in the heap by sifting it up. Runs in Θ(log(n)) amortized time, where n is the size of the heap.

Parameters

value

The value to insert.

Return Values

TRUE.

To Top