Class for creating min heap, max heap. Implementing a priority queue, heap sorting e.t.c. I know about classes SplHeap, SplMaxHeap, SplMinHeap e.t.c but I did it to practice.
__construct(array $arr = [], bool $maxHeap = true)
$arr - Array to create a heap.
$maxHeap - Heap type. If true will be create max heap.
int count()
bool insert(mixed $item)
mixed top()
mixed extractTop()
mixed extract(int $index)
array sort()
array toArray()
bool isEmpty()