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

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

Open
Beakerboy opened this issue Nov 21, 2023 · 1 comment
Open

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

Beakerboy opened this issue Nov 21, 2023 · 1 comment

Comments

@Beakerboy
Copy link
Contributor

Beakerboy commented Nov 21, 2023

The following code:

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:

@Beakerboy
Copy link
Contributor Author

#10 fixes this

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