MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Queue can be implemented using a list?
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -As in stacks, a queue can also be implemented using Arrays, Linked-lists, Pointers and Structures.

Detailed explanation-2: -Queue supports operations like enqueue and dequeue. It can be implemented using an array and linked list.

Detailed explanation-3: -Correct answer is C 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 end, then in pop operation, nodes must be removed from the beginning.

Detailed explanation-4: -A queue can be implemented in two ways: Sequential allocation: It can be implemented using an array. A queue implemented using an array can organize only a limited number of elements. Linked list allocation: It can be implemented using a linked list.

Detailed explanation-5: -A queue can be implemented using Arrays, LinkedList, pointers, etc.

There is 1 question to complete.