generate complete binary search tree