S
S
sashx2022-01-13 20:14:15
Counts
sashx, 2022-01-13 20:14:15

How to plot the maximum path in a graph using breadth-first traversal?

Friends, hello! Can you tell me how can I find the longest path in a graph using breadth-first traversal?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2022-01-14
@wataru

It is hard to find the maximum path in a graph with cycles. Bypass in width - in general in any way. Brute-force only (which is more of a recursive depth-first search, but with backtracking).
If the graph is a tree or directed acyclic, then any traversal works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question