Binary search tree: find
Jump to navigation
Jump to search
- TREE-SEARCH (x, k)
- if x= NIL or k = key[x]
- then return x
- if k < key[x]
- then return TREE-SEARCH(left[x], k)
- else return TREE-SEARCH(right[x], k)
- if x= NIL or k = key[x]