Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged stack
9
9 votes
2
2 answers
404
404 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
404
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
469
469 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
469
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
+
–
7
7 votes
1
1 answer
310
310 views
GO Classes DPP | GATE CS, DA | Data Structure | Stack Implementation & DFS
Assume there are $n$ elements in the data structure. Consider the following statements:$\text{S1}:$ A stack can be implemented using a linked list such that each individu...
GO Classes
310
views
asked
Jul 10
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-222
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
+
–
0
0 votes
1
1 answer
139
139 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
139
views
asked
Jul 10
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
python-&-dsa
goclasses-python-&-dsa-practice-questions
queue
stack
+
–
1
1 vote
2
2 answers
133
133 views
GO Classes DPP | GATE DA | Python & DSA | Queue Reversal
Consider the following Python code fragment:stack = [] while len(q) 0: stack.append(q.pop(0)) while len(stack) 0: q.append(stack.pop())Here, $\texttt{q.pop(0)}$ removes...
GO Classes
133
views
asked
Jul 9
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-219
python-&-dsa
goclasses-python-&-dsa-practice-questions
stack
+
–
1
1 vote
2
2 answers
126
126 views
GO Classes DPP | GATE DA | Python & DSA | Binary Stack
Consider the following stack-based Python code:stack = [] n = 50 while n 0: stack.append(n % 2) n = n // 2 while len(stack) 0: print(stack.pop(), end="")What is printed...
GO Classes
126
views
asked
Jul 9
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-219
python-&-dsa
goclasses-python-&-dsa-practice-questions
stack
numerical-answers
+
–
5
5 votes
2
2 answers
246
246 views
GO Classes DPP | GATE CS, DA | Data Structure | Balanced Brackets
A stack is used to check whether parentheses, braces, and brackets are properly balanced.Consider the following two inputs:Input $1: \texttt{[()]\{\}\{[()()]()\}}$Input $...
GO Classes
246
views
asked
Jul 9
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-219
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
+
–
6
6 votes
3
3 answers
321
321 views
GO Classes DPP | GATE CS, DA | Data Structure | Stack Permutation
Suppose an intermixed sequence of stack push and pop operations is performed. The push operations push the integers $0$ through $9$ in order. The pop operations print the...
GO Classes
321
views
asked
Jul 8
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-219
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
multiple-selects
+
–
7
7 votes
3
3 answers
286
286 views
GO Classes DPP | GATE CS, DA | Data Structure | Stack Output
A stack client reads tokens from left to right. If the token is a word, it is pushed onto the stack. If the token is $\texttt{-}$, one item is popped and printed.Consider...
GO Classes
286
views
asked
Jul 8
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-219
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
+
–
7
7 votes
3
3 answers
320
320 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
320
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
stack
+
–
6
6 votes
2
2 answers
235
235 views
GO Classes DPP | GATE CS | Data Structures | Postfix Prefix
Which of the following statements is true about arithmetic expressions?Parentheses are needed in all arithmetic expressions. Infix expressions do not require precedence r...
GO Classes
235
views
asked
Jul 7
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-316
data-structures
goclasses-ds-practice-questions
stack
+
–
5
5 votes
2
2 answers
214
214 views
GO Classes DPP | GATE CS | Data Structures | Stack Permutation
Which of the following permutations can be obtained in the same order using a stack, assuming the input sequence is:$$5, 6, 7, 8, 9$$$7, 8, 9, 5, 6$ $5, 9, 6, 7, 8$ $7, 8...
GO Classes
214
views
asked
Jul 7
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-316
data-structures
goclasses-ds-practice-questions
stack
+
–
4
4 votes
2
2 answers
215
215 views
GO Classes DPP | GATE CS | Data Structures | Stack Operation Trace
If the following sequence of operations is performed on an initially empty stack:push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), popwhat is the sequence ...
GO Classes
215
views
asked
Jul 7
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-316
data-structures
goclasses-ds-practice-questions
stack
+
–
5
5 votes
3
3 answers
222
222 views
GO Classes DPP | GATE CS | Data Structures | Push Pop Trace
An initially empty stack undergoes the following operations:push(40) push(10) push(10) push(pop() + pop()) push(20) push(5) push(pop() / pop())Assume the division operati...
GO Classes
222
views
asked
Jul 7
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-316
data-structures
goclasses-ds-practice-questions
stack
+
–
3
3 votes
1
1 answer
252
252 views
UGC NET CSE | December 2025 | Part 2 | Question: 8
Arrange the following prefix expressions in ascending order on the basis of their values.$-\:*\: 2\: /\: 8\:4\:3$$\uparrow \:- \:* \: 3\:6\:*\: 4\:2\:5$$+\:-\:\uparrow \:...
Shubham Sharma 2
252
views
asked
Apr 19
Analytical Aptitude
ugcnetcse-dec2025
expression-evaluation
stack
analytical-aptitude
+
–
13
13 votes
4
4 answers
2.2k
2.2k 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.2k
views
asked
Feb 23
Data Structures
gatecse-2026-set2
data-structures
stack
queue
multiple-selects
two-marks
+
–
0
0 votes
2
2 answers
529
529 views
Stack implementation
ARUN_YADAV 1
529
views
asked
Jan 20
Programming in C
data-structures
stack
+
–
0
0 votes
1
1 answer
249
249 views
Data Structures
How can we implement a doubly linked list to build a stack and find the median? What would be the time complexity (insertion, deletion and median) ?
Atreo
249
views
asked
Dec 18, 2025
Programming in C
stack
data-structures
algorithms
made-easy-test-series
+
–
0
0 votes
1
1 answer
314
314 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
314
views
asked
Dec 3, 2025
Algorithms
algorithms
time-complexity
stack
queue
data-structures
array
self-doubt
+
–
1
1 vote
0
0 answers
135
135 views
UPSC CBI 2025 | Assistant Programmer | Question: 52
What is the output of the following java code?// Demonstrate block scope. class Scope { public static void main(String args[]) { int x=10; if (x =10) { int y =20; System....
admin
135
views
asked
Oct 19, 2025
Others
upsc-cbi-ap-2025
data-structures
stack
+
–
4
4 votes
2
2 answers
695
695 views
UGC NET CSE | June 2025 | Part 2 | Question: 26
Consider the following infix expression $Q:\left((A+B)^{*} D\right) \uparrow(E-F)$. The equivalent postfix expression of $Q$ is$A B+D ^{*} E F \uparrow$ -$A B+D^{*}-\upar...
Shubham Sharma 2
695
views
asked
Sep 10, 2025
Data Structures
ugcnetcse-june2025
expression-evaluation
infix-prefix
stack
+
–
1
1 vote
1
1 answer
277
277 views
UGC NET CSE | January 2025 | Part 2 | Question: 44
The entire set of parameters, including return address that is stored for a procedure invocation is referred tostack framestack basestack limitstack record
Shubham Sharma 2
277
views
asked
Sep 10, 2025
Compiler Design
ugcnetcse-jan2025
operating-system
stack
data-structures
+
–
2
2 votes
1
1 answer
363
363 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
363
views
asked
Sep 10, 2025
Data Structures
ugcnetcse-jan2025
data-structures
queue
stack
deque
+
–
3
3 votes
2
2 answers
340
340 views
UGC NET CSE | December 2023 | Part 2 | Question: 4
What is the result of evaluating the postfix expression "$43^{*} 25^{*}+b-$ " ?$8$$14$$10$$5$
Shubham Sharma 2
340
views
asked
Sep 9, 2025
Data Structures
ugcnetcse-dec2023
expression-evaluation
stack
programming-in-c
+
–
Page:
1
2
3
4
5
6
...
11
next »