MCPcopy 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
2def longest_distance(graph):
3 indegree = [0] * len(graph)
4 queue = []

Callers

nothing calls this directly

Calls 1

longest_distanceFunction · 0.85

Tested by

no test coverage detected