Q1:
2026: 31 May Shift 1
Computer Science
Queue
Medium
Computer Science
What is the time complexity of inserting an element into a queue which is implemented using an array?
2026: 31 May Shift 1
Computer Science
Queue
Medium
Computer Science
What is the time complexity of inserting an element into a queue which is implemented using an array?
2026: 31 May Shift 1
Computer Science
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.
2026: 31 May Shift 1
Computer Science
Queue
Easy
Computer Science
Which of the following is NOT an application of the queue data structure?
2026: 31 May Shift 1
Computer Science
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]
2026: 29 May Shift 2
Computer Science
Queue
Easy
Computer Science
Which of the following is an application of queue?
2026: 29 May Shift 2
Computer Science
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")
2026: 29 May Shift 2
Computer Science
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:
| 1 | 2 | 3 | 4 | 5 |
|---|
Operation:
Enqueue(6), Dequeue(), Enqueue(7), Dequeue(), Dequeue()
2026: 29 May Shift 2
Computer Science
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
2026: 29 May Shift 1
Computer Science
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.
2026: 29 May Shift 1
Computer Science
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
2026: 29 May Shift 1
Computer Science
Queue
Easy
Computer Science
Identify the example that does not fit in the category of Queue:
2026: 29 May Shift 1
Computer Science
Queue
Easy
Computer Science
_____________ function always adds an element at the rear of a queue.
2026: 26 May Shift 1
Computer Science
Queue
Easy
Computer Science
A queue will behave like _____, if insertion and deletion occurs at same end.
2026: 26 May Shift 1
Computer Science
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?
2026: 26 May Shift 1
Computer Science
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
2026: 26 May Shift 1
Computer Science
Queue
Easy
Computer Science
__________ is a linear list of elements in which insertion and deletion always take place from different ends.
2026: 24 May Shift 1
Computer Science
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
2026: 24 May Shift 1
Computer Science
Queue
Easy
Computer Science
Which of the following statements is true in the context of a Deque?
2026: 24 May Shift 1
Computer Science
Queue
Easy
Computer Science
Which of the following is a linear data structure?
(A) Deque
(B) Queue
(C) Stack
(D) Tree
2026: 24 May Shift 1
Computer Science
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?
2026: 23 May Shift 2
Computer Science
Queue
Medium
Computer Science
In which sequence the operations are allowed to result in a queue with:
| X | C | V |
|---|
Where the original array to be inserted was:
| Z | X | C | V |
|---|
A. enqueue(Z)
B. dequeue()
C. enqueue(C)
D. enqueue(V)
E. enqueue(X)
2026: 23 May Shift 2
Computer Science
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
2026: 23 May Shift 2
Computer Science
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()
2026: 23 May Shift 2
Computer Science
Queue
Easy
Computer Science
A Queue is an ordered linear data structure, which follows ___________ strategy.
2026: 23 May Shift 1
Computer Science
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?
2026: 23 May Shift 1
Computer Science
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
2026: 23 May Shift 1
Computer Science
Queue
Easy
Computer Science
_____________ is used to insert a new element to the queue at the __________ end.
2026: 23 May Shift 1
Computer Science
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())
2026: 21 May Shift 1
Computer Science
Queue
Easy
Computer Science
What is the purpose of the following function?
def fun(mydeque):
if not (isEmpty()):
return mydeque[0]
else:
print("empty")
2026: 21 May Shift 1
Computer Science
Queue
Easy
Computer Science
_________ is a version of queue that allows insertion and deletion at both ends.