aalhour / aalhour/C-Sharp-Algorithms

Rethinking BST `Find` method signature

Ouverte
#173 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C#
Étoiles
6.2k
Forks
1.4k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

**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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.