First of all let’s clear thing up:
Finding the longest path of a graph algorithm is NOT the inverse of Dijkstra’s algorithm of finding the shortest path. In fact finding the longest path of a graph in NP-Hard problem.
In our case, the graph is a tree-shaped graph, more like a triangle.
Recent Comments