See the Wikipedia article for details and references about
bidirectional search. This
technique does not change the worst-case behavior of the algorithm but reduces, in some cases,
the number of visited vertices in practice. This implementation alternatively constructs forward
and reverse paths from the source and target vertices respectively.

This iterator can use a custom heap implementation, which can specified during the construction time.
Pairing heap is used by default