Sove pllve problem 18 with binary search tree