binary search tree and some operations using linked list