mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-03-13 08:51:02 +08:00
Add Hamiltonian cycle.
This commit is contained in:
@@ -91,6 +91,7 @@ function hamiltonianCycleRecursive({
|
||||
cycle: currentCycle,
|
||||
});
|
||||
|
||||
// BACKTRACKING.
|
||||
// Remove candidate vertex from cycle path in order to try another one.
|
||||
currentCycle.pop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user