What would you like to Propose?
The poll() method is a new feature introduced to optimize the removal and retrieval of the head node's value in a singly linked list.
Issue details

Additional Information
public int poll() {
if (head == null) {
return -1; // Return a default value or handle empty case
}
int headValue = head.val;
head = head.next;
return headValue;
}