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

Rethinking BST Find method signature #173

Open
pypkaed opened this issue Oct 19, 2023 · 1 comment
Open

Rethinking BST Find method signature #173

pypkaed opened this issue Oct 19, 2023 · 1 comment

Comments

@pypkaed
Copy link

pypkaed commented Oct 19, 2023

Describe the bug
The Find method in BinarySearchTree throws exceptions. Semantically, 'Find' and 'Get' are two different methods. My suggestion is to return null in case nothing is found in 'Find' and throw exceptions in a new method 'Get'. I understand that there would be a backwards compatibility issue, but the current state really limits the usage of the method and is unintuitive to use.

@github-actions
Copy link

Thanks for supporting the development of C# Algorithms with your first issue! We look forward to handling it.

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