Your question is Implement Queue Using Linked List. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Implement a queue using a singly linked list. Your queue should support the following operations:
enqueue(value: int): Add an item to the end of the queue.dequeue() -> int: Remove and return the item from the front of the queue. If the queue is empty, return -1.is_empty() -> bool: Check if the queue is empty.def enqueue(value: int) -> None:
def dequeue() -> int:
def is_empty() -> bool: