Q2.webp
V

Q2.webp

Question: 2
(Choose 1 answer)
Select the statement that is most correct.
Suppose we are considering a singly linked list and p is some node in the list which has both predecessor
and successor nodes. What does the java code snippet below do?
Node f= head;
while(f.next!= p) f = f.next;
f.next = p.next;
A. It deletes the node p.
B. It deletes the node before p.
C. It deletes the node after p.
D. It does not make any change on the list.

Thông tin

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

Share this media

Back
Bên trên Bottom