The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook Login
Google 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
0
votes
1
answer
1
Stack
Every recursive program uses strictly more stack space compared to its iterative equivalent. This statement is false. Please explain with examples
asked
4 days
ago
in
Programming
by
Shamim Ahmed
Active
(
1k
points)

26
views
stack
datastructure
0
votes
0
answers
2
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
in
Computer Networks
by
srestha
Veteran
(
103k
points)

36
views
datastructure
stack
0
votes
2
answers
3
Stack Memory
asked
Nov 7
in
CO & Architecture
by
Na462
Loyal
(
7.4k
points)

47
views
stack
computerarchitecture
+1
vote
1
answer
4
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
in
DS
by
GATEBOOK
Loyal
(
6.1k
points)

119
views
gb2019ds1
stack
0
votes
1
answer
5
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
in
Programming
by
GATEBOOK
Loyal
(
6.1k
points)

47
views
gb2019ds1
stack
+1
vote
1
answer
6
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
in
Programming
by
GATEBOOK
Loyal
(
6.1k
points)

64
views
gb2019ds1
stack
0
votes
1
answer
7
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
in
DS
by
Lakshman Patel RJIT
Boss
(
20k
points)

74
views
datastructure
stack
0
votes
0
answers
8
Infix to postfix (Complicated declarations)
asked
Oct 20
in
Programming
by
Mk Utkarsh
Boss
(
29.6k
points)

58
views
stack
datastructure
infixpostfix
0
votes
1
answer
9
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
in
DS
by
himanshu6398
(
37
points)

41
views
datastructure
stack
0
votes
0
answers
10
Subroutine Call
asked
Sep 24
in
CO & Architecture
by
Na462
Loyal
(
7.4k
points)

52
views
coandarchitecture
stack
0
votes
1
answer
11
work book
pseudo code of stack declare a stack of characters while (there are more character in the word to read) { read a character push the character on the stack } while(the stack is not empty) { pop a character off the stack write the character to the screen } What is the output of input "192761"?
asked
Aug 8
in
DS
by
amit166
Junior
(
529
points)

51
views
stack
0
votes
0
answers
12
work book
Let S be a stack with operations push, pop, top, empty. What is displayed after following segment of code executes . for(i=1; i<=5; i++) s.push(i); while(!s.empty()) printf("%d", s.top()); ans with explanation
asked
Aug 8
in
DS
by
amit166
Junior
(
529
points)

65
views
stack
+2
votes
3
answers
13
test series
Which of the following permutations can be obtained in the same order using a stack assuming that input is the sequence 5,6,7,8,9 in that order? A ) 7,8,9,5,6 B ) 5,9,6,7,8 C ) 7,8,9,6,5 D ) 9,8,7,5,6
asked
Jul 29
in
Compiler Design
by
Kalpataru Bose
(
497
points)

92
views
acetestseries
madeeasytestseries
testbooktestseries
comi
compilerdesign
runtimeenvironments
stack
0
votes
1
answer
14
Self doubt
What are the minimum number of pointers required to implement a stack using single ended queue ( the queue is NOT a dequeue )?
asked
Jul 26
in
DS
by
kapilbk1996
(
407
points)

93
views
stack
queues
datastructure
pointers
+1
vote
1
answer
15
What is the total number of distinct words that can be formed out of n letters using below operations with stack ?
asked
Jul 24
in
Programming
by
radha gogia
Loyal
(
7.9k
points)

125
views
datastructure
stack
0
votes
0
answers
16
doubt stack
A queue is implemented using two stacks S1 and S2. Initially the queue contains 1, 2, 3, 4 from front to rear. The following operations are performed in the queue: delete, insert (5), delete, Then how many total no. of push and pop operations are needed to perform the above operation? a) Push: 12 Pop: 13 b) Push: 15 Pop: 16 c) Push: 11 Pop: 10 d) Push: 12 Pop: 11
asked
Jul 24
in
DS
by
bhavnakumrawat5
(
193
points)

106
views
stack
0
votes
1
answer
17
Entriies in s stack are "ordered".
Entries in a stack are "ordered". What is the meaning of this statement?
asked
Jul 4
in
DS
by
arya_stark
Junior
(
947
points)

87
views
datastructure
stack
0
votes
1
answer
18
Stack
What is difference between $pop\left ( \right )$,$empty Stack\left ( \right )$,$delete Stack\left ( \right )$? Can all be performed in $O\left ( 1 \right )$ time?
asked
Jun 22
in
Programming
by
srestha
Veteran
(
103k
points)

112
views
stack
datastructure
0
votes
2
answers
19
data structure
To remove recursion from a program we have to use which of the following data structure? array stack queue list
asked
Jun 18
in
DS
by
eyeamgj
Loyal
(
6.3k
points)

187
views
datastructure
recursion
stack
0
votes
1
answer
20
Implement stack and queue using priority queue
asked
Jun 17
in
Algorithms
by
pallaviamu
(
207
points)

126
views
clrs
datastructure
stack
queues
priorityqueue
0
votes
1
answer
21
ACE Test Series Question
Suppose a stack $S$. Which is empty initially consider the following code: int values[] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19}; for(int i=0; i<10; i++) { S.PUSH = (values[i]); } int n = 25; for (int i=0; i<4; i++) { n+= S.POP(); } for(int i=0; i<2; i++) { n= S.POP(); } printf("%d",n); The output of the program code is _________ .
asked
Jun 6
in
DS
by
Shankar Kakde
(
173
points)

151
views
datastructure
stack
programming
0
votes
1
answer
22
Evaluation of Postfix expression using stack
asked
May 6
in
DS
by
JaiKumar Guwalani
(
11
points)

306
views
datastructure
timecomplexity
spacecomplexity
infixpostfix
stack
0
votes
0
answers
23
Implementation of Stack and Queue
In implementation of queue using stack, deletion of second element from front take Ο(n) time, when insertion take Ο(1) time. Is it a true statement ? Well it can be true isn't it ? because suppose elements come we simply push them without taking care of ... to stack1. dnQueue(q) 1) If stack1 is empty then error 2) Pop an item from stack1 and return it Am i right?
asked
May 5
in
Programming
by
Na462
Loyal
(
7.4k
points)

162
views
datastructure
queues
stack
0
votes
1
answer
24
#Test_Series
Consider implementation of stack using queue by following algorithm. Let $x$ be an element to be pushed in the stack push(q1,x) { EQ(q1,x) while(q1 does not contain 1 element) { k=DQ(q1) EQ(q1,k) } } pop(q1) { DQ(q1) } How many enqueue and dequeue operations required to push $2$ and pop $2$ elements in the empty stack?
asked
Apr 30
in
DS
by
himgta
Active
(
2.8k
points)

97
views
datastructure
stack
queues
0
votes
0
answers
25
Compile Design Question From run time environment
asked
Apr 16
in
Compiler Design
by
Ronish Jariwala 1
(
87
points)

69
views
compilerdesign
effectivememoryaccess
stack
symboltable
runtimeenvironments
0
votes
1
answer
26
Stack and queue
Hi please verify me We can implement a stack using only one queue. Like first insert into queue and for popping a element from stack dequeue n1 element from queue and enque into queue and then pop last element and do the same each time......try it and verify that I am right or wrong?
asked
Apr 7
in
Programming
by
Ravi prakash pandey
Junior
(
807
points)

166
views
datastructure
queues
stack
0
votes
1
answer
27
#Push & #Pop
A queue is implemented using two stacks S1 and S2. Initially the queue contains 1, 2, 3, 4 from front to rear. The following operations are performed in the queue: delete, insert (5), delete, Then how many total no. of push and pop operations are needed to perform the above operation? a) Push: 12 Pop: 13 b) Push: 15 Pop: 16 c) Push: 11 Pop: 10 d) Push: 12 Pop: 11
asked
Jan 31
in
DS
by
Tuhin Dutta
Loyal
(
8.4k
points)

177
views
datastructure
stack
queue
0
votes
0
answers
28
Made Easy Mock 1
Consider the following statements: S1 : Implementation of stack using queue, deletion of second element from top of stack time complexity Ο(n), when insertion take Ο(1) time. S2 : In implementation of queue using stack, deletion of second element from front ... Ο(n) time. Both the statements are true. HOW? Kindly provide a detailed explanation. I am unable to solve such questions.
asked
Jan 31
in
DS
by
_jerry
(
353
points)

136
views
madeeasytestseries
datastructure
stack
queues
+2
votes
0
answers
29
TestSeries Stack
Given finite alphabet S = {A, B, C} and stack S of size 100. There are only three stack operations we can perform as mentioned below. Stack is initially empty and we do not perform pop ( ) on empty stack. Assume that only emit ( ) can print output and stack may or ... of stack operations to get A B C A C B A as output are ______. I am getting 15 but it is given 14. Please help.
asked
Jan 26
in
Programming
by
MiNiPanda
Boss
(
17.4k
points)

126
views
datastructure
stack
madeeasytestseries
+1
vote
1
answer
30
ME  BASIC  4 Data Structures
Consider the following statements: S1: If stack is implemented as an array, all the operation push, pop, is_empty stack ( ), delete stack ( ) can be performed in constant time. S2: If stack is implemented as a linked list, all the ... structure. S4: Circular queues can be implemented with the help of the stack data structure. Which of the following option is false?
asked
Jan 23
in
DS
by
Rishabh Gupta 2
Boss
(
15.3k
points)

275
views
madeeasytestseries
datastructure
stack
queues
Page:
1
2
3
4
5
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
IIT HYDERABAD M.Tech (RA) 3Years Winter Session Interview experience
INDIAN AIR FORCE
GATE BOOK _ TEST SERIES DOUBT_
Visualizing complex C code
GATE Book Test Series
Follow @csegate
Gatecse
Recent questions tagged stack
Recent Blog Comments
when will be the grand/full test added??
There is one more problem. Ppl who have...
CL013924707IN rt?
I ordered the GO BOOK 6 dec ....but still i didnt...
44,263
questions
49,758
answers
164,198
comments
65,849
users