Glossary: Data Structures and Algorithms in JavaScript
visited set
Also written: visited, seen
A Set of places a search has already reached, so none is handled twice. Without it, BFS would loop forever around a cycle of roads.
Glossary: Data Structures and Algorithms in JavaScript
Also written: visited, seen
A Set of places a search has already reached, so none is handled twice. Without it, BFS would loop forever around a cycle of roads.