emilydolson / python-red-black-trees

Red-black tree implementation in Python
Other
21 stars 5 forks source link

Successor and predecessor of max and min values results in error #14

Open Beakerboy opened 9 months ago

Beakerboy commented 9 months ago
    bst = RedBlackTree()

    bst.insert(55)
    bst.insert(40)
    bst.insert(58)
    bst.insert(42)

    assert bst.successor(bst.search(58)).key is None

while not y.is_null() and x == y.right: E AttributeError: 'NoneType' object has no attribute 'is_null'

Beakerboy commented 9 months ago

Should it return None or Node()?