BST and bst2dll implementation