The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Recent questions tagged stack
+1
vote
1
answer
1
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.
asked
Jun 28
in
Algorithms
by
akash.dinkar12
Boss
(
41.4k
points)

40
views
cormen
datastructure
stack
descriptive
0
votes
0
answers
2
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.
asked
Jun 28
in
Algorithms
by
akash.dinkar12
Boss
(
41.4k
points)

14
views
cormen
datastructure
stack
descriptive
0
votes
1
answer
3
Cormen Edition 3 Exercise 10.1 Question 1 (Page No. 235)
STACKEMPTY(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 STACKEMPTY(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]$
asked
Jun 28
in
Algorithms
by
akash.dinkar12
Boss
(
41.4k
points)

26
views
cormen
datastructure
stack
descriptive
0
votes
0
answers
4
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)$
asked
May 22
in
DS
by
srestha
Veteran
(
114k
points)

60
views
madeeasytestseries
datastructure
stack
0
votes
2
answers
5
Made Easy Test Series:Data StructureStack
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??
asked
May 6
in
DS
by
srestha
Veteran
(
114k
points)

131
views
madeeasytestseries
datastructure
stack
0
votes
0
answers
6
StackDS(Conceptual Doubt)
Is it TRUE or FALSE? Stack allocation can allocate and deallocate dynamic variables and can manage runtime storage
asked
Apr 3
in
Algorithms
by
srestha
Veteran
(
114k
points)

69
views
datastructure
stack
0
votes
0
answers
7
Ullman(2e) Exercise8.3.2 page no524 Code Generation
Generate code for the following threeaddress 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
in
Compiler Design
by
aditi19
Active
(
4.3k
points)

76
views
compilerdesign
intermediatecode
targetcodegeneration
stack
pointers
0
votes
2
answers
8
Programming Stack (ACE)
Runtime stack doesnot contain (A) Local variables (B) Static Variables (C) Parameter Passed (D) Return Address
asked
Mar 1
in
Programming
by
srestha
Veteran
(
114k
points)

125
views
stack
+1
vote
2
answers
9
GATEBOOK2019 Mock Test128
If the expression $((2 + 3) * 4 + 5 * (6 + 7) * 8) + 9$ is evaluated with $*$ having precedence over $+$, then the value obtained is the same as the value of which of the following prefix expressions? $+ + * + 2 3 4 * * 5 + 6 7 8 9$ $+ * + + 2 3 4 * * 5 + 6 7 8 9$ $* + + 2 3 4 * * 5 + + 6 7 8 9$ $* + + + 2 3 4 * * 5 + 6 7 8 9$
asked
Jan 19
in
DS
by
GATEBOOK
Boss
(
11.4k
points)

151
views
gb2019mock1
stack
prefixnotation
0
votes
0
answers
10
# stack
infix ,postfix ,prefix expression evalution stack use as operator or operand?
asked
Jan 10
in
Compiler Design
by
amit166
Junior
(
563
points)

54
views
stack
0
votes
1
answer
11
# stacks
How many enqueue and dequeue operations are required to perform a pop operation if Q1 contains n element initially?
asked
Jan 6
in
DS
by
amit166
Junior
(
563
points)

45
views
stack
0
votes
0
answers
12
# 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
asked
Jan 4
in
DS
by
amit166
Junior
(
563
points)

51
views
queue
stack
0
votes
0
answers
13
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.
asked
Jan 2
in
Programming
by
Gurdeep Saini
Loyal
(
10k
points)

126
views
datastructure
queues
stack
0
votes
0
answers
14
GO2019FLT143
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
asked
Dec 27, 2018
in
DS
by
Ruturaj Mohanty
Active
(
2.5k
points)

214
views
go2019flt1
datastructure
stack
0
votes
0
answers
15
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/(92^2) + 6*4 ??
asked
Dec 25, 2018
in
Compiler Design
by
anurag sharma
(
277
points)

144
views
compilerdesign
stack
activationrecords
0
votes
1
answer
16
Stack
If two stack is growing two opposite end of array. Then which logic works and how?
asked
Dec 24, 2018
in
DS
by
srestha
Veteran
(
114k
points)

158
views
stack
datastructure
0
votes
0
answers
17
Number of subnets can be formed by using the subnet mask 255.255.248.0 in a class B network _________
asked
Dec 15, 2018
in
Computer Networks
by
rahuljai
Junior
(
545
points)

129
views
computernetworks
datastructure
stack
0
votes
1
answer
18
Stack
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
by
Shamim Ahmed
Active
(
2.3k
points)

82
views
stack
datastructure
0
votes
0
answers
19
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!!!
asked
Dec 7, 2018
in
Programming
by
CHïntän ÞäTël
(
211
points)

84
views
madeeasytestseries
datastructure
stack
infixpostfix
+1
vote
1
answer
20
NIELIT 201854
______ 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
by
Arjun
Veteran
(
418k
points)

47
views
nielit2018
stack
expressionevaluation
+1
vote
0
answers
21
MadeEasy Test Series: Programming & DS  Stack
Consider a stack S given below with elements 1,2,3 along with the usual operations push(), pop() and top() as shown. The number of elements that will remain in the stack after the parsing of the input string according to the above SDT rules is _______ I think the answer should be 5 but 4 is provided as answer.
asked
Dec 7, 2018
in
DS
by
Gupta731
Active
(
4.6k
points)

84
views
madeeasytestseries
datastructure
stack
0
votes
1
answer
22
MadeEasy Test Series: Programming & DS  Stack
My doubt : What should we consider ^ operator as Bitwise XOR ? or Exponentiation
asked
Dec 1, 2018
in
DS
by
jatin khachane 1
Loyal
(
6.9k
points)

122
views
madeeasytestseries
datastructure
stack
infixpostfix
0
votes
0
answers
23
Multiple Stacks in Single Array
Consider the implementation of multiple stacks in single array S of size P from index 0 to P – 1. Number of stack Q each of size P/Q. Now, how push() and pop() implemented in it. Can somebody give some insight on this implementation
asked
Nov 21, 2018
in
Computer Networks
by
srestha
Veteran
(
114k
points)

134
views
datastructure
stack
0
votes
2
answers
24
Stack Memory
asked
Nov 7, 2018
in
CO and Architecture
by
Na462
Loyal
(
6.7k
points)

68
views
stack
computerarchitecture
+1
vote
2
answers
25
GATEBOOK2019DS112
Let the minimum number of stack(s) required to evaluate a prefix expression is $A$ and the value of the prefix expression $+2*34+/8215$ (all numbers are unit digit) evaluated using the same number of stack(s) is $B$. What are the values of $A$ and $B$? $1,4$ $2,6$ $1,6$ $2,4$
asked
Oct 27, 2018
in
DS
by
GATEBOOK
Boss
(
11.4k
points)

194
views
gb2019ds1
stack
0
votes
1
answer
26
GATEBOOK2019DS114
The pseudo code of a function is given below which takes an integer $n$ as its argument, and uses a stack $S$ to process the number. void foo(int n) { stack S; while (n >= 1) { push(&S, n%2); n = n/2; } while (!isEmpty(& ... order Prints binary representation of $n$ Prints the binary value of $\log n$ in reverse order Prints the binary value of $2^n$ in reverse order
asked
Oct 27, 2018
in
Programming
by
GATEBOOK
Boss
(
11.4k
points)

68
views
gb2019ds1
stack
+1
vote
1
answer
27
GATEBOOK2019DS125
A stack is implemented using two queues. Initially the stack is empty. Then following sequence of operations are performed on stack: ... to simulate these stack operations is, (assuming $\text{pop}()$ is less costly between the two operations.): $28$ $31$ $35$ $37$
asked
Oct 27, 2018
in
Programming
by
GATEBOOK
Boss
(
11.4k
points)

134
views
gb2019ds1
stack
+1
vote
1
answer
28
stack underflow
A stack of size (1 to N) and the initial position of top pointer is 0. get(i,S) is aroutine to get ith element from stack 'S' with respect to top. then,what is the underflow condition on stack to perform get() operation? $A) topi<N$ $B) topi+1<=N$ $C) topi<=0$ $D) topi+1<=0$
asked
Oct 22, 2018
in
DS
by
Lakshman Patel RJIT
Boss
(
46.5k
points)

157
views
datastructure
stack
0
votes
0
answers
29
Infix to postfix (Complicated declarations)
Please convert it to postfix by using stack and explain in detail void (*bsd_signal(int sig, void (*func)(int)))(int);
asked
Oct 20, 2018
in
Programming
by
Mk Utkarsh
Boss
(
34.9k
points)

148
views
stack
datastructure
infixpostfix
0
votes
1
answer
30
nptel lecture on stacks
While calculating the cost of growable arraybased stack.... the cost of n pushes came out as a series  2 + 4 + 8 + 16 +......+2^(logn + 1) and it equals to 4n  1. I didn't understand how the series sum equals to 4n?
asked
Oct 9, 2018
in
DS
by
himanshu6398
(
51
points)

74
views
datastructure
stack
Page:
1
2
3
4
5
6
next »
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
Recent Posts
GATE 2020 Application Form Opened!
My GATE Preparation Journey
ISI MTECH CS 2019 INTERVIEW EXPERIENCE
IIT HYDERABAD MTECH TA INTERVIEW EXPERIENCE
How to prepare for GATE with a fulltime job??
Follow @csegate
Recent questions tagged stack
Recent Blog Comments
will pdfs be uploaded ?
6th...
Sir
4th...
49,984
questions
55,135
answers
190,487
comments
85,112
users