[ad_1]
a)Write a method isHamiltonianCycle(int graph[][], int path[]) which determines whether the
contents of the path array form a valid Hamiltonian cycle for the graph. Hint: make sure to check that all
criteria in [a] have been satisfied.
b)Write a method canAdd(int graph[][], int path[], int pos, int v) which checks
whether it is possible to safely add vertex v to the valid partial path of length pos. Hint: this should be
somewhat similar to your answer in [b].
Sample Solution
The post Hamiltonian Circuit appeared first on acestar tutors.
[ad_2]
Source link