A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a ?

A.

Queue

B.

Stack

C.

Tree

D.

Linked list

Answer: Option A

Explanation:

Linear list of elements in which deletion is done at front side and insertion at rear side is called Queue. In stack we will delete the last entered element first.

The data structure required for Breadth First Traversal on a graph is?

A.

Stack

B.

Array

C.

Queue

D.

Tree

Answer: Option C

Explanation:

In Breadth First Search Traversal, BFS, starting vertex is first taken and adjacent vertices which are unvisited are also taken. Again, the first vertex which was added as an unvisited adjacent vertex list will be considered to add further unvisited vertices of the graph. To get first unvisited vertex we need to follows First In First Out principle. Queue uses FIFO principle.

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.

A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?

A.

Queue

B.

Circular queue

C.

Dequeue

D.

Priority queue

Answer: Option C

Explanation:

In dequeuer, we can insert or delete elements from both the ends. In queue, we will follow first in first out principle for insertion and deletion of elements. Element with least priority will be deleted in a priority queue.