From bda26583ae4ba80a85eeb7e292dc4d4408d1807b Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Fri, 31 Jul 2026 18:33:17 -0700 Subject: [PATCH] Remove unnecessary comparison --- notes-and-examples/2026.07.21/main.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/notes-and-examples/2026.07.21/main.py b/notes-and-examples/2026.07.21/main.py index b145596..7c0a6c8 100644 --- a/notes-and-examples/2026.07.21/main.py +++ b/notes-and-examples/2026.07.21/main.py @@ -19,8 +19,6 @@ def depth_first_search(graph: dict, start, visited=set(), traversal=list()): visited.add(start) traversal.append(start) - if len(visited)==len(graph): - return for x in graph[start]: depth_first_search(graph, x, visited, traversal)