CSD201_-_FE_-_SU_2023_401.webp
C

CSD201_-_FE_-_SU_2023_401.webp

  • Media owner Carla89
  • Ngày thêm
OD
(Choose 1 answer)
Suppose we are implementing a queue using a singly linked list where the the head of the
head of the queue.
Specify the correct implementation of dequeue() method of the queue. (Choose the most:
A. Object dequeue()
{ if(isEmpty()) return(null);
Node p = head;head=head.next;
if(head==tail) tail=null;
return(p.info);
}
B. Object dequeue()
{ if(isEmpty()) return(null);Node p = head:
head-head.next;
return(p.info);
}
C. Object dequeue(){ if(isEmpty()) return(null);
Node p = head;
head=head.next;if(head==null) tail=null;
return(p.info);
}
D. Object dequeue()
{ if(isEmpty()) return(null);
head=head next
(21)

Thông tin

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

Image metadata

Filename
CSD201_-_FE_-_SU_2023_401.webp
File size
61.7 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom