Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged queue
2
2 votes
1
1 answer
125
125 views
GO Classes DPP | GATE CS, DA | Algorithms | BFS Maximum Space
BFS is performed from the root of a binary tree containing $n$ vertices.For which type of binary tree can BFS require $\Theta(n)$ extra space in the worst case?A complete...
GO Classes
125
views
asked
Aug 14
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-250
goclasses-cs-dpp
goclasses-cs-dpp-day-348
algorithms
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-algo-practice-questions
dfs-bfs
queue
tree
multiple-selects
+
–
2
2 votes
1
1 answer
117
117 views
GO Classes DPP | GATE CS, DA | Algorithms | BFS Queue
Consider the standard BFS algorithm, except for one modification:A vertex is marked as visited only when it is removed from the queue, instead of when it is first inserte...
GO Classes
117
views
asked
Aug 14
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-250
goclasses-cs-dpp
goclasses-cs-dpp-day-348
algorithms
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-algo-practice-questions
dfs-bfs
queue
multiple-selects
+
–
2
2 votes
1
1 answer
107
107 views
GO Classes DPP | GATE CS, DA | Algorithms | BFS Queue
Consider two vertices $x$ and $y$ that are simultaneously on the FIFO queue at some point during the execution of breadth-first search from $s$ in an undirected graph.Whi...
GO Classes
107
views
asked
Aug 13
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-249
goclasses-cs-dpp
goclasses-cs-dpp-day-347
algorithms
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-algo-practice-questions
dfs-bfs
queue
+
–
9
9 votes
2
2 answers
353
353 views
GO Classes DPP | GATE CS, DA | Data Structure | Stack and Queue Transfer
Given a stack $S$ with $5$ elements from top to bottom as:$2, 4, 6, 8, 10$and an empty queue $Q$.First, remove the elements one by one from $S$ and insert them into $Q$.T...
GO Classes
353
views
asked
Jul 27
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-234
goclasses-cs-dpp
goclasses-cs-dpp-day-332
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
queue
+
–
7
7 votes
1
1 answer
396
396 views
GO Classes DPP | GATE CS, DA | Data Structure | Stack & Queue
Which of the following statements are true?$\text{S1.}$ Stack operations $\texttt{push}$, $\texttt{pop}$, and $\texttt{isEmpty}$ can be worst-case $O(1)$ for a linked-lis...
GO Classes
396
views
asked
Jul 27
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-234
goclasses-cs-dpp
goclasses-cs-dpp-day-332
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
queue
priority-queue
+
–
0
0 votes
1
1 answer
89
89 views
GO Classes DPP | GATE DA | Python & DSA | FIFO Trace
A queue follows FIFO order. Consider the following operations on an initially empty queue:q = [] q.append("A") q.append("B") q.append("C") x = q.pop(0) q.append("D") y = ...
GO Classes
89
views
asked
Jul 10
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
python-&-dsa
goclasses-python-&-dsa-practice-questions
queue
+
–
0
0 votes
1
1 answer
113
113 views
GO Classes DPP | GATE DA | Python & DSA | Queue with Two Stacks
A queue is to be implemented using two stacks and only a constant amount of extra memory. Which of the following correctly implements queue behavior with constant amortiz...
GO Classes
113
views
asked
Jul 10
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
python-&-dsa
goclasses-python-&-dsa-practice-questions
queue
stack
+
–
0
0 votes
1
1 answer
75
75 views
GO Classes DPP | GATE DA | Python & DSA | Rear Cost
Give the running time of each operation in the following queue class, where the item most recently inserted is at $\texttt{_a[0]}$.class Queue: def __init__(self): self._...
GO Classes
75
views
asked
Jul 10
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
python-&-dsa
goclasses-python-&-dsa-practice-questions
queue
+
–
0
0 votes
1
1 answer
67
67 views
GO Classes DPP | GATE DA | Python & DSA | Front Cost
Give the running time of each operation in the following queue class, where the item least recently inserted is at $\texttt{_a[0]}$.class Queue: def __init__(self): self....
GO Classes
67
views
asked
Jul 10
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
python-&-dsa
goclasses-python-&-dsa-practice-questions
queue
+
–
4
4 votes
1
1 answer
173
173 views
GO Classes DPP | GATE CS, DA | Data Structure | Queue Order
Suppose a client performs an intermixed sequence of $\texttt{enqueue}$ and $\texttt{dequeue}$ operations on a queue. The enqueue operations put the integers $0$ through $...
GO Classes
173
views
asked
Jul 10
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
queue
multiple-selects
+
–
7
7 votes
3
3 answers
293
293 views
GO Classes DPP | GATE CS | Data Structures | Queue Using Stacks
A queue is implemented using two stacks $\text{S1}$ and $\text{S2}$.Use the implementation where $\texttt{dequeue()}$ is $\text{O(1)}$ by keeping the front of the queue a...
GO Classes
293
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
stack
+
–
4
4 votes
2
2 answers
184
184 views
GO Classes DPP | GATE CS | Data Structures | Circular Queue
Suppose a circular queue of capacity $(n - 1)$ elements is implemented with an array of $n$ elements.Insertion and deletion operations are carried out using $\texttt{REAR...
GO Classes
184
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
+
–
6
6 votes
3
3 answers
187
187 views
GO Classes DPP | GATE CS | Data Structures | Circular Linked List Queue
A FIFO queue is represented using a circular linked list and only one external pointer $\text{Q}$.Design $1: \text{Q}$ points to the node containing the front item. Desig...
GO Classes
187
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
circular-queue
+
–
8
8 votes
2
2 answers
193
193 views
GO Classes DPP | GATE CS | Data Structures | Array Queue
Consider an array implementation of a queue. Suppose we try to keep all items at the front of a partially-filled array, so that $\texttt{data[0]}$ is always the front of ...
GO Classes
193
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
+
–
6
6 votes
3
3 answers
178
178 views
GO Classes DPP | GATE CS | Data Structures | Queue Stack Trace
Consider an initially empty stack $\text{S}$ and an initially empty queue $\text{Q}$.The following operations are performed:S.push(5) S.push(6) S.push(S.top()) S.push(7) ...
GO Classes
178
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
+
–
14
14 votes
4
4 answers
2.1k
2.1k views
GATE CSE 2026 | Set 2 | Question: 40
Consider a stack $S$ and a queue $Q$. Both of them are initially empty and have the capacity to store ten elements each. The elements $1,2,3,4$, and $5$ arrive one by one...
gatecse
2.1k
views
asked
Feb 23
Data Structures
gatecse-2026-set2
data-structures
stack
queue
multiple-selects
two-marks
+
–
0
0 votes
1
1 answer
301
301 views
Algorithms doubt
You were given an array of distinct elements of size n with indices starting from 0.-Every $(2i)^{th}$ element is pushed into a stack.-Every $(2i+1)^{th}$ element is enqu...
vishnusainune
301
views
asked
Dec 3, 2025
Algorithms
algorithms
time-complexity
stack
queue
data-structures
array
self-doubt
+
–
3
3 votes
1
1 answer
615
615 views
linked list
Suppose that we use a linked list to represent a queue and that in addition to the enqueue and dequeue functions add a new operation to the queue that deletes the last el...
ASUR
615
views
asked
Oct 26, 2025
Data Structures
linked-list
data-structures
queue
+
–
1
1 vote
1
1 answer
575
575 views
UGC NET CSE | June 2025 | Part 2 | Question: 20
What shall be the average waiting time per process if we know that $10$ processes (on average) arrive every second and there are normally $20$ processes in the queue?$03$...
Shubham Sharma 2
575
views
asked
Sep 10, 2025
Operating System
ugcnetcse-june2025
operating-system
process-scheduling
queue
average
+
–
2
2 votes
1
1 answer
357
357 views
UGC NET CSE | June 2025 | Part 2 | Question: 85
Match List I with List II$\begin{array}{|ll|ll|} \hline & \textbf{List I} & & \textbf{List II} \\ \hline \text{A.} & \text{Circular Queue} & \text{I.} & \text{Print Queue...
Shubham Sharma 2
357
views
asked
Sep 10, 2025
Data Structures
ugcnetcse-june2025
data-structures
queue
computer-science
algorithms
+
–
2
2 votes
1
1 answer
345
345 views
UGC NET CSE | January 2025 | Part 2 | Question: 57
Which of the following uses only increment operations for adding and removing element at either end?QueuesStacksPriority QueuesDeques
Shubham Sharma 2
345
views
asked
Sep 10, 2025
Data Structures
ugcnetcse-jan2025
data-structures
queue
stack
deque
+
–
2
2 votes
1
1 answer
187
187 views
NIELIT Scientific Assistant June 2025 | Question: 62
Which of the following is the primary operation for adding an element to a queue in $\text{C}?$EnqueueDequeuePushPop
Shubham Sharma 2
187
views
asked
Jul 24, 2025
Data Structures
nielit-sta-2025
queue
data-structures
programming-in-c
+
–
Page:
1
2
3
4
5
6
next »