Q28_154_20250728161835.webp
royal_peace

Q28_154_20250728161835.webp

☑Kizspy.me
Answer (Choose 1 answer)
☐ A
0
sh the exam.
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 p.left;
else p=p.right;
}
return(p);
}
B. Node search(int x)
{ Node p = root;
while(p.info != x)
{if(x<p.info) p p.left;
}
else p=p.right;
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);
}
LAPTOP RUNNING

Thông tin

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

Share this media

Back
Bên trên Bottom