mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-04 00:18:02 +00:00
Update bst validate challenge (#115)
Change Exception to the more specific TypeError.
This commit is contained in:
@@ -120,7 +120,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
" def validate(self):\n",
|
" def validate(self):\n",
|
||||||
" if self.root is None:\n",
|
" if self.root is None:\n",
|
||||||
" raise Exception('No root node')\n",
|
" raise TypeError('No root node')\n",
|
||||||
" return self._validate(self.root)\n",
|
" return self._validate(self.root)\n",
|
||||||
"\n",
|
"\n",
|
||||||
" def _validate(self, node, mininum=-sys.maxsize, maximum=sys.maxsize):\n",
|
" def _validate(self, node, mininum=-sys.maxsize, maximum=sys.maxsize):\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user