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

Improve docs to clarify definition of an inner node's key #585

Open
Manav-Aggarwal opened this issue Oct 10, 2022 · 0 comments
Open

Improve docs to clarify definition of an inner node's key #585

Manav-Aggarwal opened this issue Oct 10, 2022 · 0 comments

Comments

@Manav-Aggarwal
Copy link

The node.md doc here says “Inner nodes have keys equal to the highest key on their left branch and have values set to nil.”

The mutable_tree.md doc here has a section Set that says inner node key is equal to left child's key

The proof.md doc here seems to draw the tree with keys of inner nodes that have leaf nodes as children as right leaf node’s key and the key of the root (also an inner node) is set to be the key of the left child of the right child of the root. (smallest key in the right subtree)

The code itself here seems to set the inner node to have the key equal to the right child’s key.

The docs should reflect the correct definition of an inner node's key or if there’s a difference between how inner nodes between a mutable tree and an immutable tree are set, that should be documented as well

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