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:
Donne Martin
2015-08-05 06:14:44 -04:00
parent 1c5f34eb3e
commit b109b6f8cc
10 changed files with 52 additions and 13 deletions

View File

@@ -98,7 +98,7 @@
" queue.append(root)\n",
" while queue:\n",
" node = queue.popleft()\n",
" visit_func(node.data)\n",
" visit_func(node)\n",
" if node.left is not None:\n",
" queue.append(node.left)\n",
" if node.right is not None:\n",