reinit only changed entries in marked, edgeTo, distTo arrays from bfs computation to computation