Glossary: Data Structures and Algorithms in Rust
clone()
Also written: clone
A method that makes an independent copy of a value. BFS clones each neighbor because the queue and the visited set each need their own copy.
Glossary: Data Structures and Algorithms in Rust
Also written: clone
A method that makes an independent copy of a value. BFS clones each neighbor because the queue and the visited set each need their own copy.