Implementation of various types of binary search trees