Data Structure MCQ - Queue using Linked List
Q1.In linked list implementation of queue, if only front pointer is maintained, which of the following operation take worst case linear time?
- Insertion
- Deletion
- To empty a queue
- Both a and c
Answer:- (D).
Explanations :Since front pointer is used for deletion, so worst time for the other two cases.
Explanations :Since front pointer is used for deletion, so worst time for the other two cases.
- AVAIL
- FRONT
- REAR
- None of these
Answer:- (A).
Explanations :All the nodes are collected in AVAIL list.
Explanations :All the nodes are collected in AVAIL list.
- FRONT is null
- REAR is null
- LINK is empty
- None of these
Answer:- (A).
Explanations :Because front represents the deleted nodes.
Explanations :Because front represents the deleted nodes.
- Underflow
- Overflow
- Front value
- Rear value
Answer:- (B).
Explanations :To check whether there is space in the queue or not.
Explanations :To check whether there is space in the queue or not.
- At the head of link list
- At the centre position in the link list
- At the tail of the link list
- None of these
Answer:- (C).
Explanations :Since queue follows FIFO so new element inserted at last.
Explanations :Since queue follows FIFO so new element inserted at last.
- At the head of link list
- At the centre position in the link list
- At the tail of the link list
- At any position in the linked list
Answer:- (C).
Explanations :Since queue follows FIFO so new element inserted at last.
Explanations :Since queue follows FIFO so new element inserted at last.
- Only front pointer
- Only rear pointer
- Both front and rear pointer
- No pointer will be changed
Answer:- (B).
Explanations :Since queue follows FIFO so new element inserted at last.
Explanations :Since queue follows FIFO so new element inserted at last.
- Only front pointer
- Only rear pointer
- Both front and rear pointer
- No pointer will be changed
Answer:- (C).
Explanations :Since its the starting of queue, so both values are changed.
Explanations :Since its the starting of queue, so both values are changed.
- In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end
- In push operation, if new nodes are inserted at the beginning, then in pop operation, nodes must be removed from the beginning
- In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from end
- In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from beginning
Answer:- (A).
Explanations :It can be done by both the methods.
Explanations :It can be done by both the methods.
- Only front pointer
- Only rear pointer
- Both front and rear pointer
- None of the mentioned
Answer:- (B).
Copyright © 2022 Shineskill Software Pvt. Ltd., All rights reserved.