implement traverse method in binary search/sort tree implement in C