If the heap has room to grow, inserts value into the store and
returns true. Otherwise, if less(value, front), calls replaceFront(value) and returns again true. Otherwise, leaves
the heap unaffected and returns false. This method is useful in
scenarios where the smallest k elements of a set of candidates
must be collected.
If the heap has room to grow, inserts value into the store and returns true. Otherwise, if less(value, front), calls replaceFront(value) and returns again true. Otherwise, leaves the heap unaffected and returns false. This method is useful in scenarios where the smallest k elements of a set of candidates must be collected.