Q1:

2026: 31 May Shift 1

Queue

Medium

Computer Science

What is the time complexity of inserting an element into a queue which is implemented using an array?

Answer options
Option 1
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 1

Q2:

2026: 31 May Shift 1

Queue

Easy

Computer Science

Arrange the following steps of checking whether a string is palindrome or not, using the deque in correct order:

A. Insert all characters of the string in deque using the INSERTREAR function one after the other.

B. Remove one character from the front and one character from the rear end of the deque using DELETERFRONT and DELETEREAR functions.

C. Match these two removed characters.

D. If these characters are same, then repeat this process of removing two characters, one from front and another from rear and comparing them until these two characters do not match. If all characters match, then stop with success, else stop with fail.

Answer options
Option 1
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 2

Q3:

2026: 31 May Shift 1

Queue

Easy

Computer Science

Which of the following is NOT an application of the queue data structure?

Answer options
Option 4
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 3

Q4:

2026: 31 May Shift 1

Queue

Easy

Computer Science

Identify the task performed by the given function.

def f1(myQueue):

if isEmpty(myQueue):

print('Queue is empty')

return None

else:

return myQueue[0]

Answer options
Option 2
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 4

Q5:

2026: 29 May Shift 2

Queue

Easy

Computer Science

Which of the following is an application of queue?

Answer options
Option 1
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 5

Q6:

2026: 29 May Shift 2

Queue

Easy

Computer Science

What is the purpose of following function?

def fun (myqueue):

if not(isEmpty(myqueue)):

return myqueue.pop(0)

else:

print("Empty")

Answer options
Option 1
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 6

Q7:

2026: 29 May Shift 2

Queue

Medium

Computer Science

Select the correct value of 'front' and 'rear' in the given queue after performing the listed operations. Consider size of the Queue as 10.

Queue:

12345

Operation:

Enqueue(6), Dequeue(), Enqueue(7), Dequeue(), Dequeue()

Answer options
Option 2
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 7

Q8:

2026: 29 May Shift 2

Queue

Medium

Computer Science

Choose the correct examples from the following where data structure 'Deque' may be applied:

A. To check whether a given string is palindrome or not

B. Evaluation of Postfix Expressions

C. Conversion of Postfix to Infix

D. Providing the Do and Undo option in text editors

Answer options
Option 2
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 8

Q9:

2026: 29 May Shift 1

Queue

Medium

Computer Science

A deque contains ‘a’,’x’,’z’,’v’ and ‘b’ (from FRONT to REAR). Elements received after deletion are ‘b’,’a’,’v’,’x’ and ‘z’. Identify the sequence of deletion operation performed on deque.

Answer options
Option 2
Correct Answer
Explanation for 2026: 29 May Shift 1 CSE question 9

Q10:

2026: 29 May Shift 1

Queue

Easy

Computer Science

Identify TRUE Statements:

(A) Queue works on First-In-First-Out (FIFO) principle.

(B) Queue is an arrangement in which new objects/items always get added at one end, usually called the REAR, and objects/items always get removed from the other end, usually called the FRONT of the queue.

(C) Queue is an ordered linear list of elements, having different ends for adding and removing elements in it.

(D) Queue works on Last-In First-Out (LIFO) principle

Answer options

Q11:

2026: 29 May Shift 1

Queue

Easy

Computer Science

Identify the example that does not fit in the category of Queue:

Answer options

Q14:

2026: 26 May Shift 1

Queue

Medium

Computer Science

Consider an empty queue and the order of given elements fom left to right.

[35, 55, 15, 62, 43, 24]

What will be the front element of the queue list after following operations are performed?

  1. ENQUEUE
  2. ENQUEUE
  3. PEEK
  4. DEQUEUE
  5. ENQUEUE
  6. DEQUEUE
  7. DEQUEUE
  8. ENQUEUE
Answer options

Q15:

2026: 26 May Shift 1

Queue

Medium

Computer Science

In a queue following operations were performed:

enqueue(8), enqueue(4), dequeue(), enqueue(7), enqueue(15), dequeue(), enqueue(18), dequeue(), enqueue(8), enqueue(4).

What will be the order of the elements in the queue starting from rear to front?

(A) 15

(B) 4

(C) 18

(D) 8

Answer options

Q16:

2026: 26 May Shift 1

Queue

Easy

Computer Science

__________ is a linear list of elements in which insertion and deletion always take place from different ends.

Answer options

Q17:

2026: 24 May Shift 1

Queue

Medium

Computer Science

Which of the following elements will be present in a queue after the end of the following operation sequence? Assume the queue is empty initially.

enqueue(10)

enqueue(20)

enqueue(30)

dequeue()

enqueue(40)

dequeue()

enqueue(50)

enqueue(60)

(A) 60

(B) 30

(C) 20

(D) 50

Answer options

Q18:

2026: 24 May Shift 1

Queue

Easy

Computer Science

Which of the following statements is true in the context of a Deque?

Answer options

Q19:

2026: 24 May Shift 1

Queue

Easy

Computer Science

Which of the following is a linear data structure?

(A) Deque

(B) Queue

(C) Stack

(D) Tree

Answer options

Q20:

2026: 24 May Shift 1

Queue

Easy

Computer Science

Sometimes, on calling a customer service center, the Interactive Voice Response System (IVRS) tells us to wait till a support person is available. Which data structure this application is of?

Answer options

Q21:

2026: 23 May Shift 2

Queue

Medium

Computer Science

In which sequence the operations are allowed to result in a queue with:

XCV

Where the original array to be inserted was:

ZXCV

A. enqueue(Z)

B. dequeue()

C. enqueue(C)

D. enqueue(V)

E. enqueue(X)

Answer options

Q22:

2026: 23 May Shift 2

Queue

Medium

Computer Science

Arrange the following operations in the correct order to delete an element from the front of a deque implemented using a doubly linked list:

A. Set front = front->next

B. Check if deque is empty

C. Free the memory of the old front node

D. If deque becomes empty, set rear = NULL

Answer options

Q23:

2026: 23 May Shift 2

Queue

Easy

Computer Science

After the following sequence of operations, what will be the order of elements removed from a queue?

ENQUEUE(2)

ENQUEUE(4)

ENQUEUE(8)

DEQUEUE()

ENQUEUE(10)

DEQUEUE()

Answer options

Q25:

2026: 23 May Shift 1

Queue

Medium

Computer Science

The elements A, B, C, D, E are to be entered in an empty queue starting from A. The following operations are performed:

Enqueue(), Enqueue(), Enqueue(), Dequeue(), Enqueue(), Dequeue()

What will be the status of the queue after the above operation?

Answer options

Q26:

2026: 23 May Shift 1

Queue

Hard

Computer Science

The elements to be inserted in the Deque are 10, 20, 30, 40, 50, 60, starting from 10.

What will be the sequence of elements after the following operations are performed on a Deque:

INSERTFRONT(), INSERTREAR(), INSERTFRONT(), DELETEREAR(), DELETEFRONT(), INSERTFRONT(), INSERTREAR(), INSERTFRONT()

A. 10

B. 40

C. 50

D. 60

Answer options

Q27:

2026: 23 May Shift 1

Queue

Easy

Computer Science

_____________ is used to insert a new element to the queue at the __________ end.

Answer options

Q28:

2026: 23 May Shift 1

Queue

Easy

Computer Science

Which of the following function can be used to insert a new element at the end of a queue?

(Assume a queue named myQueue has been created by assigning an empty list i.e., myQueue = list())

Answer options

Q29:

2026: 21 May Shift 1

Queue

Easy

Computer Science

What is the purpose of the following function?

def fun(mydeque):

if not (isEmpty()):

return mydeque[0]

else:

print("empty")

Answer options

Q30:

2026: 21 May Shift 1

Queue

Easy

Computer Science

_________ is a version of queue that allows insertion and deletion at both ends.

Answer options