emilydolson / emilydolson/python-red-black-trees

Successor and predecessor of max and min values results in error

Open
#14 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
28
Forks
5
PR merge metrics
No merged PRs in 30d

Description

```python
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'

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.