* updating DIRECTORY.md

* Fix ruff

* Fix

* Fix

* Fix

* Revert "Fix"

This reverts commit 5bc3bf342208dd707da02dea7173c059317b6bc6.

* find_max.py: noqa: PLR1730

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Maxim Smolskiy
2024-08-25 18:33:11 +03:00
committed by GitHub
parent 48418280b1
commit e3fa014a5a
13 changed files with 22 additions and 36 deletions

View File

@ -17,8 +17,7 @@ def longest_distance(graph):
for x in graph[vertex]:
indegree[x] -= 1
if long_dist[vertex] + 1 > long_dist[x]:
long_dist[x] = long_dist[vertex] + 1
long_dist[x] = max(long_dist[x], long_dist[vertex] + 1)
if indegree[x] == 0:
queue.append(x)