Text this: Enhanced prim's algorithm for finding the hamiltonian cycle in a graph