relax
RU: релаксация ребра (relax)
The operation applied to an edge (u, v) with weight w: if dist[u] + w < dist[v], lower dist[v] to that value and record parent[v] = u. It is how Dijkstra's and Bellman-Ford's algorithms improve distance estimates.
RU: релаксация ребра (relax)
The operation applied to an edge (u, v) with weight w: if dist[u] + w < dist[v], lower dist[v] to that value and record parent[v] = u. It is how Dijkstra's and Bellman-Ford's algorithms improve distance estimates.