Content deleted Content added
Nomen4Omen (talk | contribs) |
Nomen4Omen (talk | contribs) m →Successor and predecessor: if has then, but while has do |
||
Line 92:
'''end if'''
y := x.parent
'''while''' y ≠ NIL '''and''' x = y.right '''
x := y
y := y.parent
Line 103:
'''end if'''
y := x.parent
'''while''' y ≠ NIL '''and''' x = y.left '''
x := y
y := y.parent
Line 114:
|
BST-Maximum(x)
'''while''' x.right ≠ NIL '''
x := x.right
'''repeat'''
Line 120:
|
BST-Minimum(x)
'''while''' x.left ≠ NIL '''
x := x.left
'''repeat'''
|