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
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Lists
Previous
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
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
(
29
points)

25
views
datastructure
stack
0
votes
0
answers
2
Subroutine Call
asked
Sep 24
in
CO & Architecture
by
Na462
Loyal
(
6.4k
points)

40
views
coandarchitecture
stack
0
votes
1
answer
3
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
(
233
points)

47
views
stack
0
votes
0
answers
4
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
(
233
points)

61
views
stack
+2
votes
3
answers
5
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
(
465
points)

66
views
acetestseries
madeeasytestseries
testbooktestseries
comi
compilerdesign
runtimeenvironments
stack
0
votes
1
answer
6
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
(
313
points)

83
views
stack
queues
datastructure
pointers
+1
vote
1
answer
7
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.5k
points)

77
views
datastructure
stack
0
votes
0
answers
8
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
(
189
points)

89
views
stack
0
votes
1
answer
9
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
(
367
points)

80
views
datastructure
stack
0
votes
1
answer
10
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
(
98.4k
points)

99
views
stack
datastructure
0
votes
2
answers
11
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
Active
(
5.1k
points)

141
views
datastructure
recursion
stack
0
votes
1
answer
12
Implement stack and queue using priority queue
asked
Jun 17
in
Algorithms
by
pallaviamu
(
189
points)

78
views
clrs
datastructure
stack
queues
priorityqueue
0
votes
1
answer
13
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
(
127
points)

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

280
views
datastructure
timecomplexity
spacecomplexity
infixpostfix
stack
0
votes
0
answers
15
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
(
6.4k
points)

153
views
datastructure
queues
stack
0
votes
1
answer
16
#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
(
1.7k
points)

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

57
views
compilerdesign
effectivememoryaccess
stack
symboltable
runtimeenvironments
0
votes
1
answer
18
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
(
771
points)

150
views
datastructure
queues
stack
0
votes
1
answer
19
#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.2k
points)

160
views
datastructure
stack
queue
0
votes
0
answers
20
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)

129
views
madeeasytestseries
datastructure
stack
queues
+2
votes
0
answers
21
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
(
14.7k
points)

120
views
datastructure
stack
madeeasytestseries
+1
vote
1
answer
22
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
(
14.8k
points)

268
views
madeeasytestseries
datastructure
stack
queues
+1
vote
0
answers
23
drawback of Stack storage allocatioin
The drawback with stack storage allocation is when function complete its execution its result cannot be used some point of time later. Can you please explain this breifly ?
asked
Jan 21
in
Compiler Design
by
MIRIYALA JEEVAN KUMA
Active
(
2.2k
points)

88
views
compilerdesign
datastructure
stack
+2
votes
1
answer
24
Implementation of queue using stack
In implementation of queue using stack, deletion of second element from front take Ο(1) time, when insertion take Ο(n) time. Which of the following is correct ? True / False
asked
Jan 20
in
Algorithms
by
Hemant Parihar
Boss
(
15.3k
points)

259
views
datastructure
queues
stack
+1
vote
0
answers
25
TestSeries Stacks
Not able to understand the question. Kindly elaborate along with an explanation. Thank you.
asked
Jan 18
in
Programming
by
MiNiPanda
Boss
(
14.7k
points)

88
views
datastructure
stack
madeeasytestseries
+1
vote
0
answers
26
Stack
Isn't this que incomplete because no order is defined in which elements have to be pushed ..
asked
Jan 13
in
Programming
by
Pawan Kumar 2
Active
(
4.6k
points)

63
views
stack
+1
vote
2
answers
27
Implementation of stack using queues
What are the minimum enqueue and dequeue operations needed to perform pop operation for a stack which is implemented with two queues if there are already 10 elements in the first queue?
asked
Jan 12
in
DS
by
Ibtisam Sayyad
(
17
points)

266
views
datastructure
stack
queues
+2
votes
0
answers
28
Recursion Stack
My doubt is, In the stack, we will push [main()>PTN(3)>PTN(2)>PTN(1)>PTN(0)] PTN = printTwoNumbers function call Then according to answer PTN(0) won't pushed into stack, but at least to check if and return we should push it. What's the correct. My answer is 5, given is 4
asked
Jan 5
in
DS
by
Ashwin Kulkarni
Boss
(
17.9k
points)

126
views
datastructure
stack
recursion
+1
vote
0
answers
29
made easy test series
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 take Ο(1) time, when insertion take Ο(n) time. Which of the following is correct ?
asked
Jan 3
in
Programming
by
chandra sai
Active
(
1.2k
points)

167
views
stack
queues
datastructure
0
votes
0
answers
30
Stack
Consider a stack and we wish to perform an operation StackDelete() in which we wish to delete all the elements of the stack .What is the worst case time complexity of doing this if stack is implemented: 1) Using an array 2)Using a Linked list
asked
Dec 26, 2017
in
Programming
by
VS
Loyal
(
9.2k
points)

121
views
datastructure
stack
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
List of Available Exams
New Assignment on Network programming : P2P simulation
Theory of Computation  GO Classroom
Probability  GO Classroom
Daily Quiz
Follow @csegate
Gatecse
Recent questions tagged stack
Recent Blog Comments
Nice 2 know. You are welcome. :)
Hello @Arjun, I got books now...thanks for your...
You may contact FedEx local delivery office. It...
Yes you are right, it's showing this status from...
FedEx delivery is shown and as per that it is out...
40,903
questions
47,560
answers
146,295
comments
62,306
users