CSD201_-_FA_2024_-_FE_-_C2_3007.webp
E

CSD201_-_FA_2024_-_FE_-_C2_3007.webp

  • Media owner Envy81
  • Ngày thêm
ple Choices
(Choose 1
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.
answer)
A. Node search(Node p, int x){if(p.info==x) return(p);
if(x<p.info)urn(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)else
return(search(p.right,x));
} return(search(p.left,x));
I want to nisin the exam.

Thông tin

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

Image metadata

Filename
CSD201_-_FA_2024_-_FE_-_C2_3007.webp
File size
224.6 KB
Dimensions
1920px x 930px

Share this media

Back
Bên trên Bottom