Binary search tree: maximum

From Algowiki
Jump to: navigation, search
Binary search tree maximum path

TREE-MAXiMUM (x)

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