public function inHeap(int $element): bool {
        foreach ($this->heap as $key => $value) {
            if (Comparator::equals($element, $value)) {
                return true;
            }
        }
        return false;
    }