

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















10/28/
10/28/
10/28/
10/28/
10/28/
10/28/
10/28/
item
x)
{ if
T^ is
emptycreate^ new
root
vertex
v,^
set^
v.label =
x,^
return
v^ =^
root
of^
while
(v.label
x)^ {
if^ x
<^ v.labelif^ v.left_child
exists
then
v^ =^
v.left_child elsecreate
new
vertex
for
left
child
of^
v,
set^
v.label
=^ x,
return
elseif
v.right_child
exists
then
v^ =^
v.right_child elsecreate
new
vertex
for
right
child
of^
v,
set^
v.label
=^ x,
return
10/28/
10/28/
10/28/
16
10/28/
10/28/
10/28/