Q3.webp
V

Q3.webp

Question: 3
(Choose 1 answer)
Select the statement that is most correct.
Suppose we are considering a doubly linked list and p is some node in the list which has predecessor node.
What does the java code snippet below do?
Node f = p.prev; // prev is a link to predecessor node
Node q = new Node(x);
q.prev f; q.next = p;
f.next q; p.prev = q;
A. It inserts new node with value x before the node p.
B. It inserts new node with value x after the node p.
C. It replaces the node p with new node with value x.
D. It creates new node with value x at the end of the list.

Thông tin

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

Share this media

Back
Bên trên Bottom