mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Fix ruff (#11527)
* updating DIRECTORY.md
* Fix ruff
* Fix
* Fix
* Fix
* Revert "Fix"
This reverts commit 5bc3bf3422.
* 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user