Skip to content

Glossary: Data Structures and Algorithms in Java

cameFrom

Also written: cameFrom map

A map used in BFS that records, for each place, the place it was first reached from. Walking back from the goal through it rebuilds the route.

Where the book teaches it

Related terms

BFS (breadth-first search)visited set