Glossary: Algorithms Beyond the Basics in Go
Route rebuilding (cameFrom)
Also written: cameFrom, rebuilding the choice
Recording where each answer came from so you can recover the actual route or choice, not just its total. Dijkstra follows `cameFrom` back from the goal, and the knapsack walks back up its table rows.