-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Condense and extend std.Treap's traversal functionalities. #20002
base: master
Are you sure you want to change the base?
Conversation
I think the error come from me forgetting to |
The core functionalities are now in two general functions `extremeInSubtreeOnDirection()` and `nextOnDirection()` so all the other traversing functions (`getMin()`, `getMax()`, and `InorderIterator`) are all just trivial calls to these core functions. The added two functions `Node.next()` and `Node.prev()` are also just trivial calls to these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Can you add a test for |
Done. |
@squeek502 Quite a lot of code is not covered by your previous approval. Mind another look? Thanks. |
3207bf3
to
54c0fb8
Compare
@andrewrk This PR has no more action item for me. Just to clarify that I added @nektro as reviewer to see whether she has more feedback after her initial comment. Given how many days passed, I'd count that as "no further comments". Let me know if you have more comments, and if not, merge this PR. Thanks. |
Pinging Andrew doesn't automatically prioritize your PR. There is a large PR backlog which ought to be dealt with first - himself or another Zig core team member will get to this PR in time. |
@mlugg Sorry for the noise. Didn't know the status. |
The core functionalities are now in two general functions
extremeInSubtreeOnDirection()
andnextOnDirection()
so all the other traversing functions (getMin()
,getMax()
, andInorderIterator
) are all just trivial calls to these core functions.The added two functions
Node.next()
andNode.prev()
are also just trivial calls to these.