aalhour / aalhour/C-Sharp-Algorithms

Rethinking BST `Find` method signature

Đang mở
#173 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C#
Star
6.2k
Fork
1.4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.