title: Dijkstras Algorithm - Parent Nodes?
body: <p>My professor wants us to implement it for a single source node to all other nodes in the network. He said to keep track of the shortest path by using parent nodes, but I have no idea what this means in the context of the algorithm. </p>
  
  <p>I can implement my code more or less properly, in the sense that my output distances are all correct for any network I run it on.</p>
  
  <p>But most online resources talk about visiting nodes and marking them as visited once you explore all of the neighboring nodes. So for instance, if nodes A and B neighbor node C, and the new distance to A is smaller than that of B, do I mark node C visited? And then what happens if I get to node A and realize that the path it leads me down would actually cause an already recorded distance to actually be larger? </p>