How can we find the length of longest path in a directed graph that may contain cycles?
Any help would be highly appreciated.