Data Structures Multiple Choice Questions and Answers on Queue using Linked List

1. In linked list implementation of queue, if only front pointer is maintained, which of the following operation take worst case linear time?

a) Insertion
b) Deletion
c) To empty a queue
d) Both a and c
Answer: d

Explanation: Since front pointer is used for deletion, so worst time for the other two cases.
2. In linked list implementation of a queue, where does a new element be inserted?

a) At the head of link list
b) At the centre position in the link list
c) At the tail of the link list
d) None of the mentioned
Answer: c

Explanation: Since queue follows FIFO so new element inserted at last.
3. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into a NONEMPTY queue?

a) Only front pointer
b) Only rear pointer
c) Both front and rear pointer
d) None of the mentioned
Answer: b

Explanation: Since queue follows FIFO so new element inserted at last.
4. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into EMPTY queue?

a) Only front pointer
b) Only rear pointer
c) Both front and rear pointer
d) None of the mentioned
Answer: c

Explanation: Since its the starting of queue, so both values are changed.
5. In case of insertion into a linked queue, a node borrowed from the __________ list is inserted in the queue.

a) AVAIL
b) FRONT
c) REAR
d) None of the mentioned
Answer: a

Explanation: All the nodes are collected in AVAIL list.
6. In linked list implementation of a queue, from where is the item deleted?

a) At the head of link list
b) At the centre position in the link list
c) At the tail of the link list
d) None of the mentioned
Answer: a

Explanation: Since queue follows FIFO so new element deleted from first.
7. In linked list implementation of a queue, the important condition for a queue to be empty is?

a) FRONT is null
b) REAR is null
c) LINK is empty
d) None of the mentioned
Answer: a

Explanation: Because front represents the deleted nodes.
8. The essential condition which is checked before insertion in a linked queue is?

a) Underflow
b) Overflow
c) Front value
d) Rear value
Answer: b

Explanation: To check whether there is space in the queue or not.
9. The essential condition which is checked before deletion in a linked queue is?

a) Underflow
b) Overflow
c) Front value
d) Rear value
Answer: a

Explanation: To check whether there is element in the list or not.
10. Which of the following is true about linked list implementation of queue?

a) In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end
b) In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from the beginning
c) Both a and b
d) None of the mentioned
Answer: c

Explanation: It can be done by both the methods.

Related

Multiple Choice Questions 7583937341285894935

Post a Comment

emo-but-icon

item