Binary search tree: maximum

From Algowiki
Jump to navigation Jump to search

TREE-MAXiMUM (x)

while right[x] ≠ NULL
x = right[x]
return key[x]