CSD201_-_SP_2023_-_FE_166.webp
hirosi212

CSD201_-_SP_2023_-_FE_166.webp

(44)
Multiple choices 44/50
(Choose 1 answer)
Suppose a doubly linked list of integers is given below and p is a reference to the node with value 17 in the
list (i.e. p.info=17):
(head) 7 1 6 4 31 17 8 2 (tail)
What does the list look like after the following java code snippet is run?
int x = 13;
Node f = p.prev; //prev is a link to predecessor node
Node q = new Node(x);q.prev = f; q.next = p;
Next
f.next q; p.prev = q;
A. 7 1 6 4 31 17 8 2 13
B. 7 1 6 4 31 13 17 82
C. 7 1 6 4 31 17 13 8 2
D. 7 13 1 6 4 31 17 82
E. 13 7 1 6 4 31 17 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
1,784
Lượt bình luận
17
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom