I want to find the two distinct path with no shared vertices in a Directed Acyclic Graph so that sum of vertices in the two path becomes maximum. I have an O(n^3) answer for it which is pretty obvious, I need a better way.
Thanks in advance
I want to find the two distinct path with no shared vertices in a Directed Acyclic Graph so that sum of vertices in the two path becomes maximum. I have an O(n^3) answer for it which is pretty obvious, I need a better way.
Thanks in advance