☑Kizspy.me
(Choose 1 answer)
☐ A
Consider the fun() method in a singly linked list below:
void fun()
{if (isEmpty()) return;
if (head == tail)
head
tail = null;
else head
head.next;
}
Back
Next
FUO.sh
sh the exam.
Specify the correct statement about the fun() method in the code above (choose the most suitable one).
A. It removes the last element of the list
B. It removes the first element of the list
C. It removes the second element of the list
D. It returns the first element of the list