-
Notifications
You must be signed in to change notification settings - Fork 1
Add utility functions to traverse trees to find minimum, maximum node and the keys adjacent to a node #13
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
Add utility functions to traverse trees to find minimum, maximum node and the keys adjacent to a node #13
Conversation
…s within the tree and within subtrees, and an abovebelow function that returns the nodes immediately above and below a given BinaryNode
…o accepts the key, functions like an advanced search now. fixed tests using @inferred Nothing.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
=======================================
Coverage ? 97.59%
=======================================
Files ? 3
Lines ? 166
Branches ? 0
=======================================
Hits ? 162
Misses ? 4
Partials ? 0 ☔ View full report in Codecov by Sentry. |
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.
The PR looks great. Just a few suggestions and updates to comments in source code.
@eliascarv please feel free to give the final review and merge when you feel it is ready.
…Type to the full type (using their subset rule). Let me know if there's a better alternative
…an allow supertype of result
bb70a51
to
1e9a292
Compare
You can now give your final review @juliohm. |
@eliascarv feel free to merge and release a patch. If you can add me as collaborator in this repository as well, that would be great. |
Based on the discussions in #12 and #1168. This adds utility functions to compute the minimum and maximum values within subtrees (or a whole tree), and a function to find the nodes adjacent to a given node.
Current open Q's from me
A. the
@inferred
tests give errors because the inferred type is a union type, but the output types are either a union type or only the node types depending on the exact call.B. handling nothing types in above below. I can see adding a method for
tree::nothing, x::nothing
too, but this seems like a good start.