Implementation of a modified binary search tree, in C