We're one method away from having a fully functioning O(1) Queue! We just need a way to remove the first element from the linked list in constant time. When we're finished, our LinkedList will fulfill the basic requirements of a Queue:
add_to_tail: Constant time insertremove_from_head: Constant time popLet's rename the LinkedList class to LLQueue and remove the add_to_head functionality because Queues don't allow inserting into the wrong end.
We've also flipped the arrows in the printed representation to reflect the change.
Complete the remove_from_head method. It should remove the first node from the list (the head) and return it.