Skip to content

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

@Beakerboy

Description

@Beakerboy

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions