
Vivek S. answered 07/03/20
Senior Software Engineer Specializing in C/C++, Qt/QML, scripting.
I think you can solve this by modifying the Dykstra's shortest path algorithm. Please google it up. It is a recursive algorithm.
Is P.
asked 11/13/19Give an algorithm that takes as input a directed graph with positive edge lengths, and returns the length of the shortest cycle in the graph (if the graph is acyclic, it should say so). Your algorithm should take time at most O(n*m*log(n)), where n is the number of vertices and m is the number of edges.
Vivek S. answered 07/03/20
Senior Software Engineer Specializing in C/C++, Qt/QML, scripting.
I think you can solve this by modifying the Dykstra's shortest path algorithm. Please google it up. It is a recursive algorithm.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.