Question 2 of 9beginner🧠 RememberFill in the Blanks7 marks

Fill in the blank

(a)

_____ is a linear list of elements in which insertion and deletion takes place from different ends.

Answer

Queue

(b)

Operations on a queue are performed in _____ order.

Answer

FIFO

(c)

Insertion operation in a queue is called _____ and deletion operation in a queue is called _____.

Answer

enqueue, dequeue

(d)

Deletion of elements is performed from _____ end of the queue.

Answer

front

(e)

Elements ‘A’, ‘S’, ‘D’ and ‘F’ are present in the queue, and they are deleted one at a time, _____ is the sequence of element received.

Answer

A, S, D, F

(f)

_____ is a data structure where elements can be added or removed at either end, but not in the middle.

Answer

Deque

(g)

A deque contains ‘z’, ‘x’, ‘c’, ‘v’ and ‘b’. Elements received after deletion are ‘z’, ‘b’, ‘v’, ‘x’ and ‘c’. _____ is the sequence of deletion operation performed on deque.

Answer

deletefront, deleterear, deleterear, deletefront, deletefront

Explanation

The answers are derived directly from the definitions and operations of Queue and Deque data structures provided in the context. (a) A Queue is defined as a linear list where insertion (rear) and deletion (front) happen at different ends. (b) Queues follow First-In-First-Out (FIFO) order. (c) The specific terms for queue operations are 'enqueue' for insertion and 'dequeue' for deletion. (d) Deletion specifically occurs at the 'front' end. (e) Following FIFO, elements are received in the same order they were present: A, S, D, F. (f) A 'Deque' allows insertion and deletion at either end. (g) By tracing the output 'z', 'b', 'v', 'x', 'c' against the initial deque 'z', 'x', 'c', 'v', 'b', one can deduce the specific sequence of front and rear deletions.