Binary search tree: minimum: Difference between revisions

From Algowiki
Jump to navigation Jump to search
(Created page with "TREE-MINIMUM (x) :while left[x] ≠ NULL ::x = left[x] :return key[x]")
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:Bst_min.png|300px|thumb|right|Binary search tree minimum path]]
TREE-MINIMUM (x)
TREE-MINIMUM (x)
:while left[x] ≠ NULL
:while left[x] ≠ NULL
::x = left[x]
::x = left[x]
:return key[x]
:return key[x]
[[Category:Binary Search Tree]]

Latest revision as of 16:13, 18 October 2014

Binary search tree minimum path

TREE-MINIMUM (x)

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