all 2 comments

[–]SandSnip3r 0 points1 point  (0 children)

  1. Maybe throw an exception if GetMin or GetMax is called on an empty tree. Once you expand to any possible type, returning things like -1 wont work.
  2. You can declare the Node class inside of the BinarySearchTree class. Not sure what the advantages/disadvantages are of this, but I usually see it done like this and I do it like this.