First interation of binary-search-tree