Changed computeBFSEdges to take pathTable and pathSize as input