Binary search tree: maximum: Difference between revisions

From Algowiki
Jump to navigation Jump to search
(Created page with "TREE-MAXiMUM (x) :while right[x] ≠ NULL ::x = right[x] :return key[x]")
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
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
::x = right[x]
::x = right[x]
:return key[x]
:return key[x]
[[Category:Binary Search Tree]]

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]