Changed discussions of NULL to None to be more Pythonic.

This commit is contained in:
Donne Martin
2015-07-06 05:44:06 -04:00
parent 29685c7b35
commit 47e6a23dde
11 changed files with 55 additions and 55 deletions

View File

@@ -70,8 +70,8 @@
"We could solve this with an iterative or a recursive algorithm, both are well suited for this exercise. We'll use a recursive algorithm for practice with recursion. Note this takes an extra space of O(m) where m is the recursion depth.\n",
"\n",
"* Base case:\n",
" * if first and second lists are NULL AND carry is zero\n",
" * Return NULL\n",
" * if first and second lists are None AND carry is zero\n",
" * Return None\n",
"* Recursive case:\n",
" * Set `value` to `carry`\n",
" * Add both nodes' `data` to `value`\n",
@@ -87,7 +87,7 @@
"\n",
"Notes:\n",
"* Careful with adding if the lists differ\n",
" * Only add if a node is not NULL\n",
" * Only add if a node is not None\n",
" * Alternatively, we could add trailing zeroes to the smaller list"
]
},