mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Update bst validate challenge (#115)
Change Exception to the more specific TypeError.
This commit is contained in:
parent
0098574a47
commit
eb8547d8bd
|
@ -120,7 +120,7 @@
|
|||
"\n",
|
||||
" def validate(self):\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",
|
||||
"\n",
|
||||
" def _validate(self, node, mininum=-sys.maxsize, maximum=sys.maxsize):\n",
|
||||
|
|
Loading…
Reference in New Issue
Block a user