The current tests and reference implementation require for the data structure to be implemented in a very “exposed” way. It is very “academic” implementation and very much different to how .net does things with encapsulation and generic types. Changes would make for better implementations, and more educational value in my opinion.
Since the BST structure is a search one, I would remove the current
IEnumerable elements and instead add a constraint on
T to be
IComparable. I would expect the
BinarySearchTree<T> type to implement two properties
Depth and two methods
What do you think, @ErikSchierboom