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

Refine rbtree comment for clarity and accuracy #588

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Conversation

jserv
Copy link
Contributor

@jserv jserv commented Mar 24, 2025

The comment now explains that each node requires at least one byte of storage and contrasts the theoretical maximum node count with the practical depth bound of 2 * log₂(n).

The rationale for using a fixed-size array to track the tree path during operations is clearly described.

Summary by Bito

This pull request enhances the clarity and accuracy of comments in the red-black tree implementation. It details storage requirements for nodes, contrasts theoretical and practical node counts, and explains the use of a fixed-size array for tracking the tree path.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 2

@jserv jserv requested review from EagleTw and visitorckw March 24, 2025 14:57
The comment now explains that each node requires at least one byte of
storage and contrasts the theoretical maximum node count with the
practical depth bound of 2 * log₂(n).

The rationale for using a fixed-size array to track the tree path during
operations is clearly described.
@jserv jserv force-pushed the refine-rb-comment branch from 9a71504 to 066602e Compare March 24, 2025 15:00
@jserv jserv added this to the release-2025.1 milestone Mar 24, 2025
@jserv jserv merged commit 42c8986 into master Mar 25, 2025
31 of 32 checks passed
@jserv jserv deleted the refine-rb-comment branch March 25, 2025 17:30
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

Successfully merging this pull request may close these issues.

2 participants