diff options
author | Haidong Ji | 2019-06-12 10:55:58 -0500 |
---|---|---|
committer | Haidong Ji | 2019-06-12 10:55:58 -0500 |
commit | ced86db4658bdc3aba7e3f59991c1723ceae0531 (patch) | |
tree | 9a1d9721364095eedfaebe2d2a235f69b5a366dd /tests | |
parent | 560bb4c29cbbfd940e2773df0ff28d0315b16517 (diff) |
Binary Search Tree check done!
Easy after Java version is done. I'm happy that I did this
in 3 languages (Java, Python, C++). I can really tell that
Python is more succinct, whereas Java is really verbose.
Fun stuff :)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tree_bst_checkTest.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/tree_bst_checkTest.py b/tests/tree_bst_checkTest.py new file mode 100644 index 0000000..6924168 --- /dev/null +++ b/tests/tree_bst_checkTest.py @@ -0,0 +1,15 @@ +import unittest + +from sources.tree_bst_check import isBst + +class MyTestCase(unittest.TestCase): + def test_something(self): + key = [2, 1, 3] + left = [1, -1, -1] + right = [2, -1, -1] + + self.assertTrue(isBst(key, left, right)) + + +if __name__ == '__main__': + unittest.main() |