Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Beakerboy opened this issue Jan 5, 2024 · 1 comment
Open

Comments

@Beakerboy
Copy link
Contributor

    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
Copy link
Contributor Author

Should it return None or Node()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant