Q33_161_20250904125554.webp
Naoya76

Q33_161_20250904125554.webp

  • Media owner Naoya76
  • Ngày thêm
☑Kizspy.me
Answer (Choose 1 answer)
☐ A
Back
Next
Suppose we are considering a binary search tree.
Select the most correct java code snippet
that search a node with value x on the sub-tree with root p.
A. Node search(Node p, int x)
{if(p.info==x) return(p);
}
if(x<p.info)
return(search(p.left,x));
else
return(search(p.right,x));
B. Node search(Node p, int x)
{ if(p==null) return(null);
if(p.info==x) return(p);
if(x<p.info)
}
return(search(p.left,x));
else
return(search(p.right,x));
C. Node search(Node p, int x)
{if(p==null) return(null);
if(p.info==x) return(p);
if(x<p.info)
}
return(search(p.right,x));
else
return(search(p.left,x));
FUQ.sh
sh the exam.

Thông tin

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

Share this media

Back
Bên trên Bottom