emilydolson / emilydolson/python-red-black-trees

When printing a tree, the root node is preceded with R——

Open
#9 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

The following code:
```python
bst = RedBlackTree()
bst.insert(1)
bst.insert(2)
bst.insert(3)
bst.print_tree()
```

produces the following output:
```
R---- 2(BLACK)
L---- 1(RED)
R---- 3(RED)
```
I feel the following would be more appropriate:

```
2(BLACK)
L---- 1(RED)
R---- 3(RED)
```

let me know if you disagree:

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.