Q4.webp
quanghoa92

Q4.webp

Question: 4
(Choose 1 answer)
Consider the fun() method in a singly linked list below:
void fun()
{if (isEmpty()) return;
if (head == tail)
head tail = null;
else
{Node p1,p; p1=null;p=head;
j
while(p!-tail) {p1=p;p=p.next;}
p1.next=null; tail-p1;
Specify the correct statement about the fun() method in the code above (choose the most suitable one).
A. It removes a node at the middle of the list
B. It removes a node at the beginning of the list
C. It removes a node at the end of the list
D. The code does not change the list.

Thông tin

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

Share this media

Back
Bên trên Bottom