Added tree height challenge.

This commit is contained in:
Donne Martin
2015-08-02 10:53:35 -04:00
parent 5df49199b9
commit 0f55ccf38d
5 changed files with 393 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
from __future__ import print_function
from nose.tools import assert_equal
class TestHeight(object):
def test_height(self):
root = Node(5)
assert_equal(height(root), 1)
insert(root, 2)
insert(root, 8)
insert(root, 1)
insert(root, 3)
assert_equal(height(root), 3)
print('Success: test_height')
def main():
test = TestHeight()
test.test_height()
if __name__ == '__main__':
main()