mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-07 18:08:01 +00:00
Simplified challenge coding and unit tests by working with the node directly as opposed to node.id or node.data, which is more natural when writing coding challenges.
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
" root.visited = True\n",
|
||||
" while queue:\n",
|
||||
" node = queue.popleft()\n",
|
||||
" visit_func(node.id)\n",
|
||||
" visit_func(node)\n",
|
||||
" for adjacent_node in node.adjacent:\n",
|
||||
" if not adjacent_node.visited:\n",
|
||||
" queue.append(adjacent_node)\n",
|
||||
|
||||
Reference in New Issue
Block a user