Fehlerbehebung DFS: white_vertices.pop() durch next(iter(...)) ersetzt

This commit is contained in:
Oliver Hofmann 2026-06-01 13:32:20 +02:00
parent 779fbab7c8
commit 646b9c6881

View File

@ -127,7 +127,7 @@ class Graph:
predecessor_map[vertex] = None
while white_vertices:
v = white_vertices.pop()
v = next(iter(white_vertices))
dfs_visit(v)
return enter_map, leave_map, predecessor_map