Contents

The data structure required for Breadth First Traversal on a graph is?
a) Stack
b) Array
c) Queue
d) Tree

c

A queue follows……….
a) FIFO (First In First Out) principle
b) LIFO (Last In First Out) principle
c) Ordered array
d) Linear tree

a

Explanation: Element first added in queue will be deleted first which is FIFO principle.


Circular Queue is also known as ……
a) Ring Buffer    
b) Square Buffer
c) Rectangle Buffer            
d) Curve Buffer

a

Explanation: Circular Queue is also called as Ring Buffer. Circular Queue is a linear data structure in which last position is connected back to the first position to make a circle. It forms a ring structure.


If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?
a) ABCD                              
b) DCBA
c) DCAB                               
d) ABDC

a

Explanation: Queue follows FIFO approach. i.e. First in First Out Approach. So, the order of removal elements are ABCD.


A data structure in which elements can be inserted or deleted at/from both ends but not in the middle is?
a) Queue                                               
b) Circular queue
c) Dequeue                           
d) Priority queue

c

A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
a) Rear = MAX_SIZE – 1
b) Front = (rear + 1)mod MAX_SIZE
c) Front = rear + 1               
d) Rear = front

a