
uses heuristic algorithms. Unlike
HamiltonianCycles, it is not guaranteed to find a Hamiltonian cycle even when one exists. But for large graphs,

can sometimes be faster at finding one cycle.
This defines a graph of 500 vertices, and uses these two functions to find a Hamiltonian cycle: