MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / is_safe

Method is_safe

src/backtracking/hamiltonian_cycle.rs:67–75  ·  view source on GitHub ↗

Determines if it is safe to include vertex `v` in the Hamiltonian cycle path. # Arguments `v` - The index of the vertex being considered. `visited` - A reference to the vector representing the visited vertices. `path` - A reference to the current path being explored. `pos` - The position of the current vertex being considered. # Returns `true` if it is safe to include `v` in the path, `false`

(&self, v: usize, visited: &[bool], path: &[Option<usize>], pos: usize)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected