added two solutions for BST