mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-03 16:08:02 +00:00
Simplified check to determine if there are items in the queue.
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
" queue = deque()\n",
|
||||
" queue.append(root)\n",
|
||||
" root.visited = True\n",
|
||||
" while len(queue) > 0:\n",
|
||||
" while queue:\n",
|
||||
" node = queue.popleft()\n",
|
||||
" visit_func(node.id)\n",
|
||||
" for adjacent_node in node.adjacent:\n",
|
||||
|
||||
Reference in New Issue
Block a user