Hong-Phuc Bui
2 days ago 9309589ff6fe3f61abd61263f61eb890141f6491
stundenplan/src/graphdemo.py
@@ -89,19 +89,17 @@
        for start in sorted( self.vertices() ):
            for end in self.adjacent_of(start):
                (first, second) = (start, end) if (start >= end) else (end, start)
            if first in visited_edges:
                #visited_adjacent = visited_edges.get(first)
                visited_adjacent = visited_edges[first]
                if second not in visited_adjacent:
                    visited_adjacent.add(second)
                if first in visited_edges:
                    #visited_adjacent = visited_edges.get(first)
                    visited_adjacent = visited_edges[first]
                    if second not in visited_adjacent:
                        visited_adjacent.add(second)
                        action(start, end)
                else:
                    adjacent: set[int] = set()
                    visited_edges[first] = adjacent
                    adjacent.add(second)
                    action(start, end)
            else:
                adjacent: set[int] = set()
                visited_edges[first] = adjacent
                adjacent.add(second)
                action(start, end)
    def __repr__(self):
        text = ""