CSD201_-_SP_2025_-_FE_3621.webp
Kim Anh1

CSD201_-_SP_2025_-_FE_3621.webp

  • Media owner Kim Anh1
  • Ngày thêm
☑Kizspy.me
(Choose 1 answer)
☐ A
Back
Consider the fun() method in a singly linked list of integers below:
Integer fun()
{if (isEmpty()) return(null);
Integer x
tail.info;
if (head == tail)
head tail = null;
else
{Node p1,p; p1=null;p=head;
while(p!-tail) {p1=p;p=p.next;}
p1.next=null; tail=p1;
return(x);
}
}
Next
Specify the correct statement about the fun() method in the code above (choose the most suitable one).
A. It returns a node at the end of the list.
B. It removes and returns a node at the beginning of the list
C. It removes and returns a node at the middle of the list
D. It removes and returns a node at the end of the list
FUO.sh
sh the exam.

Thông tin

Category
CSD201
Thêm bởi
Kim Anh1
Ngày thêm
Lượt xem
4,876
Lượt bình luận
8
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom