CSD201_-_SP_2025_-_Block_5_-_1_3848.webp
royal_peace

CSD201_-_SP_2025_-_Block_5_-_1_3848.webp

☑Kizspy.me
(Choose 1 answer)
☐ A
Suppose we are considering a binary search tree.
Select the most correct java code snippet
that search a node with value x.
A. Node search(int x)
{ Node p = root;
while(p.info != x && p!=null)
{if(x<p.info) p
else p=p.right;
}
return(p);
}
p.left;
B. Node search(int x)
{ Node p = root;
while(p.info != x)
=
{if(x<p.info) p p.left;
else p=p.right;
FUO.sh
sh the exam.
}
return(p);
}
C. Node search(int x)
{ Node p = root;
while(p!=null && p.info != x)
{if(x<p.info) p p.left;
else p=p.right;
}
return(p);
}

Thông tin

Category
CSD201
Thêm bởi
royal_peace
Ngày thêm
Lượt xem
2,685
Lượt bình luận
3
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom