Glossary: Data Structures and Algorithms in Go
Visited set
Also written: visited, visited map
A `map[string]bool` of places a search has already reached, so none is handled twice. Without it, BFS would loop around a cycle forever.
Glossary: Data Structures and Algorithms in Go
Also written: visited, visited map
A `map[string]bool` of places a search has already reached, so none is handled twice. Without it, BFS would loop around a cycle forever.