Polish check tree balance challenge and solution (#80)

Update constraints, test cases, tests, and code.
This commit is contained in:
Donne Martin
2016-06-25 08:42:16 -04:00
committed by GitHub
parent 996058195d
commit 7882ed9ae7
3 changed files with 52 additions and 17 deletions

View File

@@ -4,7 +4,11 @@ from nose.tools import assert_equal
class TestCheckBalance(object):
def test_check_balance(self):
assert_equal(check_balance(None), False)
node = Node(5)
assert_equal(check_balance(node), True)
insert(node, 3)
insert(node, 8)
insert(node, 1)