Glossary: Data Structures and Algorithms in JavaScript
cameFrom
Also written: cameFrom map
A Map used in BFS that records, for each place, the place you came from when you first reached it. Walking back through it from the goal and reversing gives the route.