mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Ruff fixes (#8913)
* updating DIRECTORY.md * Fix ruff error in eulerian_path_and_circuit_for_undirected_graph.py * Fix ruff error in newtons_second_law_of_motion.py --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -20,7 +20,7 @@ def check_circuit_or_path(graph, max_node):
|
||||
odd_degree_nodes = 0
|
||||
odd_node = -1
|
||||
for i in range(max_node):
|
||||
if i not in graph.keys():
|
||||
if i not in graph:
|
||||
continue
|
||||
if len(graph[i]) % 2 == 1:
|
||||
odd_degree_nodes += 1
|
||||
|
Reference in New Issue
Block a user