CSD201_-_SP_2023_-_FE_166.webp
hirosi212

CSD201_-_SP_2023_-_FE_166.webp

(16)
Multiple choices 16/50
(Choose 1 answer)
Next
Suppose a doubly linked list of integers is given below and p is a reference to the node with value 10 in the
list (i.e. p.info=10):
(head) 7 11 6 4 3 10 8 2 (tail)
What does the list look like after the following java code snippet is run?
int x = 9;
Node p1, p2;
p1 = new Node(x);
p2 = p.next;
p.next = p1, p1.prev = p;
p1.next = p2; p2.prev = p1;
A. 7 11 6 4 3 10 8 2 9
B. 7 11 6 4 3 9 10 8 2
C. 7 11 6 4 3 10 9 8 2
D. 7 9 11 6 4 3 10 8 2
E. 9 7 11 6 4 3 10 82
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
43
44
45 46
47
48
49
50
42

Thông tin

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

Share this media

Back
Bên trên Bottom