-
Notifications
You must be signed in to change notification settings - Fork 5k
Red Black Tree 2 #214
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
Red Black Tree 2 #214
Conversation
@JaapWijnen Thanks for the PR. Just a few comments:
A few changes I'd like to see:
Thanks! |
Thanks for the comments! Not sure how this works but can I edit this PR? Or do I need to make a new one? Then ill go ahead and implement your suggestions. |
You should be able to update this current one. |
I changed the enums and added the CustomStringConvertible protocol per your suggestions. However I'm not too comfortable implementing your third suggestion
As especially computed properties like I also changed the property Let me know what you think! |
Solid changes overall. I'm still not comfortable with the implicitly unwrapped optionals. One of the biggest reasons is that those properties are Anyway, I'm happy to defer that issue to a later date. Before we merge, please credit yourself for doing this refactor at the bottom of the |
Done! If you have any suggestions what to change for it to work with regular optionals, please let me know! Cause I'm not sure how to get the computed properties to work without force unwrapping them. Thanks for the help! |
You're going to have to force unwrap them for computed properties, or have the computed properties return an optional. I think we'll have to dig deeper to see which is the better approach. After reading your |
Done! |
Thanks @JaapWijnen. I'm going to add a line to your |
A new version of the red black tree. Als the one already posted doesn't implement deletion correctly