TreeSearch(tree,item):
| Input tree, item
| Output true if item found in tree, false otherwise
|
| if tree is empty then
| return false
| else if item < data(tree) then
| return TreeSearch(left(tree),item)
| else if item > data(tree) then
| return TreeSearch(right(tree),item)
| else // found
| return true
| end if
|