menu
Login
Register
search
Log In
account_circle
Log In
Email or Username
Password
Remember
Log In
Register
I forgot my password
Register
Username
Email
Password
Register
add
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
GO Book for GATECSE 2022
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Exact tag match
Recent Posts
A Short Guide to GATE
Seeking DRDO Scientist B previous year papers
STRATEGY TO EFFECTIVELY CREATE SHORT & MICRO NOTES FOR GATE EXAM AND BEST REVISION STRATEGY BY AIR-"152"
My Video Experience AIR-152 GATE_CS(Some More motivation)!!!!!!
AIR 33 IN GATE 2021 AND HOW I USED GATEOVERFLOW DURING MY PREPARATION
Subjects
All categories
General Aptitude
(2.1k)
Engineering Mathematics
(8.5k)
Digital Logic
(3.1k)
Programming and DS
(5.2k)
Algorithms
(4.5k)
Theory of Computation
(6.3k)
Compiler Design
(2.2k)
Operating System
(4.7k)
Databases
(4.3k)
CO and Architecture
(3.5k)
Computer Networks
(4.3k)
Non GATE
(1.2k)
Others
(1.5k)
Admissions
(595)
Exam Queries
(838)
Tier 1 Placement Questions
(16)
Job Queries
(71)
Projects
(19)
Unknown Category
(1.1k)
Follow @gateoverflow
GATE Overflow
Recent questions tagged stack
Recent Blog Comments
🎊 Congrats buddy
Congratulations on achieving great success 👍
Of course you will but IISc/IITB only by later...
I haven't got any email from IIIT-H yet. Does...
Well sir I wanted to check their papers. I don't...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
Recent questions tagged stack
0
votes
2
answers
1
GATE CSE 2021 Set 1 | Question: 21
Consider the following sequence of operations on an empty stack. $\textsf{push}(54);\textsf{push}(52);\textsf{pop}();\textsf{push}(55);\textsf{push}(62);\textsf{s}=\textsf{pop}();$ ... $\textsf{s+q}$ is ___________.
Consider the following sequence of operations on an empty stack. $\textsf{push}(54);\textsf{push}(52);\textsf{pop}();\textsf{push}(55);\textsf{push}(62);\textsf{s}=\textsf{pop}();$ ... $\textsf{s+q}$ is ___________.
asked
Feb 18
in
DS
Arjun
443
views
gatecse-2021-set1
data-structures
stack
numerical-answers
1
vote
2
answers
2
NIELIT 2016 DEC Scientist B (IT) - Section B: 17
Which of the following is the correct order of evaluation for the below expression? $z=x+y^*z/4\%2-1$ $^*/\%+-=$ $=^*/\%+-$ $/^*\%-+=$ $^*\% /-+=$
Which of the following is the correct order of evaluation for the below expression? $z=x+y^*z/4\%2-1$ $^*/\%+-=$ $=^*/\%+-$ $/^*\%-+=$ $^*\% /-+=$
asked
Mar 31, 2020
in
DS
Lakshman Patel RJIT
362
views
nielit2016dec-scientistb-it
data-structures
operator-precedence
stack
1
vote
1
answer
3
NIELIT 2016 DEC Scientist B (IT) - Section B: 30
What data structures is used for depth first traversal of a graph? Queue Stack List None of the above
What data structures is used for depth first traversal of a graph? Queue Stack List None of the above
asked
Mar 31, 2020
in
DS
Lakshman Patel RJIT
314
views
nielit2016dec-scientistb-it
data-structures
stack
dfs
2
votes
2
answers
4
NIELIT 2016 DEC Scientist B (IT) - Section B: 42
In the ________ traversal we process all of a vertex's descendants before we move to an adjacent vertex. Depth First Breadth First Width First Depth Limited
In the ________ traversal we process all of a vertex's descendants before we move to an adjacent vertex. Depth First Breadth First Width First Depth Limited
asked
Mar 31, 2020
in
DS
Lakshman Patel RJIT
741
views
nielit2016dec-scientistb-it
data-structures
stack
dfs
1
vote
2
answers
5
NIELIT 2017 July Scientist B (CS) - Section B: 6
Assume that the operators $+,-,\times$ are left associative and $\wedge$ is right associative. The order of precedence(from highest to lowest) is $\wedge,\times, +,-$ ... $abc\times+de\wedge f\wedge-$ $ab+c\times d-e\wedge f\wedge $ $-+a\times bc\wedge\wedge def$
Assume that the operators $+,-,\times$ are left associative and $\wedge$ is right associative. The order of precedence(from highest to lowest) is $\wedge,\times, +,-$. The postfix expression corresponding to the infix expression $a+b\times c-d\wedge e\wedge f$ is $abc\times+def\wedge\wedge-$ $abc\times+de\wedge f\wedge-$ $ab+c\times d-e\wedge f\wedge $ $-+a\times bc\wedge\wedge def$
asked
Mar 30, 2020
in
DS
Lakshman Patel RJIT
273
views
nielit2017july-scientistb-cs
data-structures
stack
infix-prefix
1
vote
2
answers
6
UGCNET-Jan2017-II: 22
The seven elements $A, B, C, D, E,F$ and $G$ are pushed onto a stack in reverse order, i.e., starting from $G$. The stack is popped five times and each element is inserted into a queue. Two elements are deleted from the queue and pushed back onto the stack. Now, one element is popped from the stack. The popped item is ___________. $A$ $B$ $F$ $G$
The seven elements $A, B, C, D, E,F$ and $G$ are pushed onto a stack in reverse order, i.e., starting from $G$. The stack is popped five times and each element is inserted into a queue. Two elements are deleted from the queue and pushed back onto the stack. Now, one element is popped from the stack. The popped item is ___________. $A$ $B$ $F$ $G$
asked
Mar 24, 2020
in
DS
jothee
338
views
ugcnetjan2017ii
data-structures
stack
3
votes
3
answers
7
ISRO2020-72
A stack is implemented with an array of $'A[0...N-1]'$ and a variable $pos$'. The push and pop operations are defined by the following code. push (x) A[pos] <- x pos <- pos -1 end push pop() pos <- pos+1 return A[pos] end pop ... an empty stack with capacity $N$ for the above implementation $pos \leftarrow -1$ $pos\leftarrow 0$ $pos\leftarrow 1$ $pos\leftarrow N-1$
A stack is implemented with an array of $'A[0...N-1]'$ and a variable $pos$'. The push and pop operations are defined by the following code. push (x) A[pos] <- x pos <- pos -1 end push pop() pos <- pos+1 return A[pos] end pop Which of the ... initialize an empty stack with capacity $N$ for the above implementation $pos \leftarrow -1$ $pos\leftarrow 0$ $pos\leftarrow 1$ $pos\leftarrow N-1$
asked
Jan 13, 2020
in
DS
Satbir
718
views
isro-2020
data-structures
stack
normal
4
votes
2
answers
8
Cormen Edition 3 Exercise 10.1 Question 7 (Page No. 236)
Show how to implement a stack using two queues. Analyze the running time of the stack operations.
Show how to implement a stack using two queues. Analyze the running time of the stack operations.
asked
Jun 28, 2019
in
Algorithms
akash.dinkar12
267
views
cormen
data-structures
stack
descriptive
1
vote
1
answer
9
Cormen Edition 3 Exercise 10.1 Question 2 (Page No. 235)
Explain how to implement two stacks in one array $A[1...n]$ in such a way that neither stack overflows unless the total number of elements in both stacks together is $n$.The $PUSH$ and $POP$ operations should run in $O(1)$ time.
Explain how to implement two stacks in one array $A[1...n]$ in such a way that neither stack overflows unless the total number of elements in both stacks together is $n$.The $PUSH$ and $POP$ operations should run in $O(1)$ time.
asked
Jun 28, 2019
in
Algorithms
akash.dinkar12
231
views
cormen
data-structures
stack
descriptive
1
vote
1
answer
10
Cormen Edition 3 Exercise 10.1 Question 1 (Page No. 235)
STACK-EMPTY(S) 1 if S.top == 0 2 return TRUE 3 else return FALSE PUSH(S , x) 1 S.top = S.top + 1 2 S[S.top] = x POP(S) 1 if STACK-EMPTY(S) 2 error underflow 3 else S.top = S.top - 1 4 return S[S.top + 1] illustrate the result of ... $S$ stored in array $S[1...6]$
STACK-EMPTY(S) 1 if S.top == 0 2 return TRUE 3 else return FALSE PUSH(S , x) 1 S.top = S.top + 1 2 S[S.top] = x POP(S) 1 if STACK-EMPTY(S) 2 error “underflow” 3 else S.top = S.top – 1 4 return S[S.top + 1] illustrate the result of each operation in the sequence $PUSH(S,4), PUSH(S,1),PUSH(S,3),POP(S),PUSH(S,8),POP(S)$ on an initially empty stack $S$ stored in array $S[1...6]$
asked
Jun 28, 2019
in
Algorithms
akash.dinkar12
142
views
cormen
data-structures
stack
descriptive
1
vote
1
answer
11
Made Easy Test Series: Stack Address
A stack based CPU executes the instruction. Memory location $500$ contain $0X 88$ and memory location $700$ contain $0X37$. The stack pointer is at $0X003F$ The instruction are as follows: $I_{1}:PUSH$ $500$ $I_{2}:PUSH$. $700$ ... execution of instruction. $C)$ Memory location $600$ contain $0XBF$ after execution of instruction. $D)$ Both $a)$ and $c)$
A stack based CPU executes the instruction. Memory location $500$ contain $0X 88$ and memory location $700$ contain $0X37$. The stack pointer is at $0X003F$ The instruction are as follows: $I_{1}:PUSH$ $500$ $I_{2}:PUSH$. $700$ $I_{3}:ADD$ $I_{4}:POP$ ... $0X88$ after execution of instruction. $C)$ Memory location $600$ contain $0XBF$ after execution of instruction. $D)$ Both $a)$ and $c)$
asked
May 22, 2019
in
DS
srestha
348
views
made-easy-test-series
data-structures
stack
2
votes
2
answers
12
Made Easy Test Series:Data Structure-Stack
There is given a infix expression: ${\color{Red} {1}}$ $A+B\times C/\left ( \left ( D+E \right )+F\times G \right )$ While converting infix expression to postfix expression number of symbols in the stack at indicated ... $5$, but is it correct? Can anyone give some explanation??
There is given a infix expression: ${\color{Red} {1}}$ $A+B\times C/\left ( \left ( D+E \right )+F\times G \right )$ While converting infix expression to postfix expression number of symbols in the stack at indicated ${\color{Red} {point-1}}$ infix expression (assume stack is initially empty) ______________ they told $5$, but is it correct? Can anyone give some explanation??
asked
May 6, 2019
in
DS
srestha
406
views
made-easy-test-series
data-structures
stack
1
vote
0
answers
13
Stack-DS(Conceptual Doubt)
Is it TRUE or FALSE? Stack allocation can allocate and deallocate dynamic variables and can manage runtime storage
Is it TRUE or FALSE? Stack allocation can allocate and deallocate dynamic variables and can manage runtime storage
asked
Apr 3, 2019
in
Algorithms
srestha
228
views
data-structures
stack
0
votes
0
answers
14
Ullman(2e) Exercise-8.3.2 page no-524 Code Generation
Generate code for the following three-address statements assuming stack allocation where register SP points to the top of the stack x = 1 x=a x = a + 1 x = a+b The two statements x = b * c y = a + x
Generate code for the following three-address statements assuming stack allocation where register SP points to the top of the stack x = 1 x=a x = a + 1 x = a+b The two statements x = b * c y = a + x
asked
Apr 1, 2019
in
Compiler Design
aditi19
456
views
compiler-design
intermediate-code
target-code-generation
stack
pointers
1
vote
3
answers
15
Programming Stack (ACE)
Runtime stack doesnot contain (A) Local variables (B) Static Variables (C) Parameter Passed (D) Return Address
Runtime stack doesnot contain (A) Local variables (B) Static Variables (C) Parameter Passed (D) Return Address
asked
Mar 1, 2019
in
Programming
srestha
322
views
stack
0
votes
1
answer
16
# stack
infix ,postfix ,prefix expression evalution stack use as operator or operand?
infix ,postfix ,prefix expression evalution stack use as operator or operand?
asked
Jan 10, 2019
in
Compiler Design
amit166
149
views
stack
1
vote
1
answer
17
# stacks
How many enqueue and dequeue operations are required to perform a pop operation if Q1 contains n element initially?
How many enqueue and dequeue operations are required to perform a pop operation if Q1 contains n element initially?
asked
Jan 6, 2019
in
DS
amit166
241
views
stack
1
vote
1
answer
18
# iit goa data strructre
5. Assume I have a stack s, a queue q, and a binary search tree t. Initially all of them are empty. Indicate the state of the data structures at line number 7 and at the end. What is the maximum height each of the data structures had during the execution? 1 i $\rightarrow$ 0 ... 0 8 while i <= 9 do 9 t.insert(s.pop()) 10 t.insert(q.get()) 11 i $\rightarrow$ i + 1 12 end
5. Assume I have a stack s, a queue q, and a binary search tree t. Initially all of them are empty. Indicate the state of the data structures at line number 7 and at the end. What is the maximum height each of the data structures had during the execution? 1 i $\rightarrow$ 0 2 while i <= ... $\rightarrow$ 0 8 while i <= 9 do 9 t.insert(s.pop()) 10 t.insert(q.get()) 11 i $\rightarrow$ i + 1 12 end
asked
Jan 4, 2019
in
DS
amit166
187
views
queue
stack
1
vote
2
answers
19
Stack implementation by using queue
true/false ? ) if stack is implemented as a array,all operation push ,pop ,is emptystack(),delete stack() can be performed in constant time. )if stack is implemented as a linked list ,all operation ,is emptystack(),delete stack() can be performed in constant time.
true/false ? ) if stack is implemented as a array,all operation push ,pop ,is emptystack(),delete stack() can be performed in constant time. )if stack is implemented as a linked list ,all operation ,is emptystack(),delete stack() can be performed in constant time.
asked
Jan 2, 2019
in
Programming
Gurdeep Saini
403
views
data-structures
queue
stack
2
votes
0
answers
20
GO2019-FLT1-43
Ginmans Stack are a kind of special data structure in which if there are odd number of elements then the middle most element is popped out and printed on the screen. In case of even number of elements the recently popped out element is again pushed back either on the top or bottom of the stack randomly. ... i, ii ii, iii iii, iv ii, iv
Ginmans Stack are a kind of special data structure in which if there are odd number of elements then the middle most element is popped out and printed on the screen. In case of even number of elements the recently popped out element is again pushed back either on the top or bottom of the stack randomly. Assume ... i, ii ii, iii iii, iv ii, iv
asked
Dec 27, 2018
in
DS
Ruturaj Mohanty
451
views
go2019-flt1
data-structures
stack
1
vote
0
answers
21
stack activation records
What is the maximum number of activation records inserted into stack while converting following infix expression to postfix expression is Infix expression: 7+5*3^2/(9-2^2) + 6*4 ??
What is the maximum number of activation records inserted into stack while converting following infix expression to postfix expression is Infix expression: 7+5*3^2/(9-2^2) + 6*4 ??
asked
Dec 25, 2018
in
Compiler Design
anurag sharma
387
views
compiler-design
stack
activation-records
1
vote
1
answer
22
Stack
If two stack is growing two opposite end of array. Then which logic works and how?
If two stack is growing two opposite end of array. Then which logic works and how?
asked
Dec 24, 2018
in
DS
srestha
733
views
stack
data-structures
1
vote
1
answer
23
Number of subnets can be formed by using the subnet mask 255.255.248.0 in a class B network _________
What’s the right answer ?, please have a look at Q.5(here) they are appending network bits but this question doesn't.
asked
Dec 15, 2018
in
Computer Networks
rahuljai
419
views
computer-networks
data-structures
stack
1
vote
1
answer
24
Stack
Every recursive program uses strictly more stack space compared to its iterative equivalent. This statement is false. Please explain with examples
Every recursive program uses strictly more stack space compared to its iterative equivalent. This statement is false. Please explain with examples
asked
Dec 11, 2018
in
Programming
Shamim Ahmed
250
views
stack
data-structures
2
votes
0
answers
25
MadeEasy Subject Test 2019: Programming & DS - Stack
I THING THERE IS MISTAKE BECAUSE BRACKET ARE CLOSING AFTER ELEMENT E SO ALL OPERATORS HOULD BE POPED AND AND ACCORDING TO ME ANWER SHOLD BE 2… TRY AND CORRECT IF I M WRONG !!!! THANKS IN ADVANCE!!!
I THING THERE IS MISTAKE BECAUSE BRACKET ARE CLOSING AFTER ELEMENT E SO ALL OPERATORS HOULD BE POPED AND AND ACCORDING TO ME ANWER SHOLD BE 2… TRY AND CORRECT IF I M WRONG !!!! THANKS IN ADVANCE!!!
asked
Dec 7, 2018
in
Programming
CHïntän ÞäTël
189
views
made-easy-test-series
data-structures
stack
infix-prefix
3
votes
4
answers
26
NIELIT 2018-54
______ to evaluate an expression without any embedded function calls. Two stacks are required one stack is needed Three stacks are required More than three stacks are required
______ to evaluate an expression without any embedded function calls. Two stacks are required one stack is needed Three stacks are required More than three stacks are required
asked
Dec 7, 2018
in
DS
Arjun
711
views
nielit-2018
data-structures
stack
expression-evaluation
Page:
1
2
3
4
5
6
next »
...