Queue using Linked List

Uncategorized

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Queue using Linked List”.

1. 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) At any position in the linked list

Answer: C
Explanation: Since the queue is FIFO, the new element is inserted last.

2. 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 Insertion and To empty a queue

Answer: D
Explanation: Since the front pointer is used for deletion, the other two instances have the hardest time.

3. 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) No pointer will be changed

Answer: C
Explanation: Since this is the beginning of the queue, all values have been modified.

4. 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) No pointer will be changed

Answer: B
Explanation: Since the queue is FIFO, the new element is inserted last.

5. 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) Node before the tail

Answer: A
Explanation: Since the queue is FIFO, new elements are removed from the top.

6. 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) NULL

Answer: a
Explanation: The AVAIL list includes all of the nodes.

7. 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 see if there is any available space in the queue.

8. 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) FRONT==REAR-1

Answer: A
Explanation: Since the deleted nodes are represented in the front.

9. 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 beginning, then in pop operation, nodes must be removed from the beginning
C) In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from end
D) In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from beginning

Answer: A
Explanation: Both strategies can be used to achieve this.

10. 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 decide whether or not there is an element in the list.

Each node of a linked queue is made up of two parts: the data part and the connection part. Every element of the queue points to the memory’s next available element. In the memory of the connected queue, there are two pointers: front pointer and rear pointer. A linked list data structure can be used to enforce a queue data structure. The related list queue can handle an infinite number of values. That is to say, a queue using a linked list can handle data of varying sizes (No need to fix the size at beginning of the implementation).

Leave a Reply

Your email address will not be published. Required fields are marked *