This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % branch as the root. % if element is greater than tree.val, then make recursive call with % right branch as root. if element < tree.val out = bintreeSearch(tree.left, element); elseif element > tree.val out = bintreeSearch(tree.right, element); end end % end if tree.val end % end bintreeSearch.m...
View Full Document
- Spring '08