Implement Queue using singly linked list. Enqueue should take O(1) time and Dequeue should take O(1) time.
Unlike stack, for queues, we need two pointers: first and last. Enqueue will happen in last. Dequeue will happen in the first. Initially first and last both will point to the one node. After that every enqueue will have insertion happen at last->next.
Dequeue will happen at the first. If first and last both are equal, both will equal to NULL.