Skip to content

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.

Where the book teaches it

Related terms

Breadth-first search (BFS)reverse()