Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void removeLast(Deque *queue){
- if(!isEmpty(queue)) {
- if(!(queue->tail)->next) // in case of last element in the queue
- reset(queue);
- else{
- Node *node = (queue->head)->back;
- node->next = NULL;
- free(queue->head);
- queue->head = node;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement