B
B
bober2282022-04-13 17:50:58
C++ / C#
bober228, 2022-04-13 17:50:58

How to simulate breaking graph vertices?

There is a task where you need to make a program that, using algorithms, calculates the shortest path from a point to a point in a graph, one of the points asks you to make an imitation of a break in some graph vertices and recalculate the paths. Please tell me how this can be implemented.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2022-04-13
@bober228

You must either remove a vertex from the graph, or mark it as deleted, and in your pathfinding algorithm, simply skip such marked vertices in all cycles over the vertices.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question