Fix typos (#191)

This commit is contained in:
delirious-lettuce
2017-05-15 22:30:12 -06:00
committed by Donne Martin
parent cd9e9654bc
commit 9f89a51aba
33 changed files with 71 additions and 71 deletions

View File

@@ -74,7 +74,7 @@
"source": [
"## Algorithm\n",
"\n",
"We'll use a recursive solution that valides left <= current < right, passing down the min and max values as we do a depth-first traversal.\n",
"We'll use a recursive solution that validates left <= current < right, passing down the min and max values as we do a depth-first traversal.\n",
"\n",
"* If the node is None, return True\n",
"* If min is set and the node's value <= min, return False\n",
@@ -123,12 +123,12 @@
" raise TypeError('No root node')\n",
" return self._validate(self.root)\n",
"\n",
" def _validate(self, node, mininum=-sys.maxsize, maximum=sys.maxsize):\n",
" def _validate(self, node, minimum=-sys.maxsize, maximum=sys.maxsize):\n",
" if node is None:\n",
" return True\n",
" if node.data <= mininum or node.data > maximum:\n",
" if node.data <= minimum or node.data > maximum:\n",
" return False\n",
" if not self._validate(node.left, mininum, node.data):\n",
" if not self._validate(node.left, minimum, node.data):\n",
" return False\n",
" if not self._validate(node.right, node.data, maximum):\n",
" return False\n",