Binary search tree: maximum: Difference between revisions

From Algowiki
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:
[[File:Bst_max.png|300px|thumb|right|Binary search tree maximum path]]
TREE-MAXiMUM (x)
TREE-MAXiMUM (x)
:while right[x] ≠ NULL
:while right[x] ≠ NULL

Latest revision as of 16:14, 18 October 2014

Binary search tree maximum path

TREE-MAXiMUM (x)

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