Implementations of binary trees in C++