CSD201_-_SU_2023_-_Block_5_-_FE_736.webp
Kokushibo91

CSD201_-_SU_2023_-_Block_5_-_FE_736.webp

(Choose 1 answer)
A. Object dequeue(){if(isEmpty()) return(null);Node p = head;head-head.next;if(head==null) tail=null;return(p.info);
}
B. Object dequeue(){ if(isEmpty()) return(null);Node p = head;
head-head.next;
if(head==tail) tail=null;return(p.info);
}
C. Object dequeue(){if(isEmpty()) return(null);
head-head.next;if(head.next==null) tail=null;return(head.info);
}
D. Object dequeue(){ if(isEmpty()) return(null);
Node p = head;head-head.next;
} return(p.info);
an to nis ni

Ex 36
A Suppose we are implementing a queue using a singly linked list where the the head of the list is treated as the
head of the queue.Specify the correct implementation of dequeue() method of the queue. (Choose the most suitable one)

Thông tin

Category
CSD201
Thêm bởi
Kokushibo91
Ngày thêm
Lượt xem
1,672
Lượt bình luận
17
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
CSD201_-_SU_2023_-_Block_5_-_FE_736.webp
File size
62.5 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom