Q4_1_20250829131239.webp
Goku777

Q4_1_20250829131239.webp

  • Media owner Goku777
  • Ngày thêm
☑Kizspy.me
(Choose 1 answer)
☐ A
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)
Back
Next
FUQ.sh
sh the exam.
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);
}
}
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

Thông tin

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

Share this media

Back
Bên trên Bottom