Modified binary search tree.