Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ kahns_algorithm_long.py
File
kahns_algorithm_long.py
graphs/kahns_algorithm_long.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
# Finding longest distance in Directed Acyclic Graph using KahnsAlgorithm
2
def
longest_distance(graph):
3
indegree = [0] * len(graph)
4
queue = []
Callers
nothing calls this directly
Calls
1
longest_distance
Function · 0.85
Tested by
no test coverage detected