emilydolson/python-red-black-trees

Successor and predecessor of max and min values results in error

Opened this issue · 1 comments

    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'

Should it return None or Node()?