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
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
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
(
39
points)

26
views
stack
0
votes
0
answers
2
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
(
39
points)

42
views
stack
0
votes
2
answers
3
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
(
367
points)

33
views
acetestseries
madeeasytestseries
testbooktestseries
comi
compilerdesign
runtimeenvironments
stack
0
votes
1
answer
4
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
(
265
points)

53
views
stack
queues
datastructure
pointers
0
votes
1
answer
5
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.2k
points)

45
views
datastructure
stack
0
votes
0
answers
6
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
(
139
points)

75
views
stack
0
votes
1
answer
7
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
(
249
points)

67
views
datastructure
stack
0
votes
1
answer
8
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
(
91.8k
points)

88
views
stack
datastructure
0
votes
2
answers
9
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
(
3.4k
points)

97
views
datastructure
recursion
stack
0
votes
1
answer
10
Implement stack and queue using priority queue
asked
Jun 17
in
Algorithms
by
pallaviamu
(
175
points)

61
views
clrs
datastructure
stack
queues
priorityqueue
0
votes
1
answer
11
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
(
51
points)

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

230
views
datastructure
timecomplexity
spacecomplexity
infixpostfix
stack
0
votes
0
answers
13
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
Active
(
4.5k
points)

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

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

49
views
compilerdesign
effectivememoryaccess
stack
symboltable
runtimeenvironments
0
votes
1
answer
16
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
(
753
points)

141
views
datastructure
queues
stack
0
votes
0
answers
17
#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
(
7.9k
points)

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

118
views
madeeasytestseries
datastructure
stack
queues
+2
votes
0
answers
19
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
Loyal
(
8.3k
points)

110
views
datastructure
stack
madeeasytestseries
+1
vote
1
answer
20
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.4k
points)

255
views
madeeasytestseries
datastructure
stack
queues
+1
vote
0
answers
21
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
(
1.8k
points)

82
views
compilerdesign
datastructure
stack
+2
votes
1
answer
22
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
(
14.9k
points)

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

82
views
datastructure
stack
madeeasytestseries
+1
vote
0
answers
24
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.5k
points)

62
views
stack
+1
vote
2
answers
25
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)

250
views
datastructure
stack
queues
+2
votes
0
answers
26
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.8k
points)

125
views
datastructure
stack
recursion
+1
vote
0
answers
27
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)

162
views
stack
queues
datastructure
0
votes
0
answers
28
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
(
8.9k
points)

117
views
datastructure
stack
+1
vote
0
answers
29
Min #Stack operations
Let's consider we have a stack with three operations defined on it:: Push,Pop, Peek We have to print "ABCACBA" using the above operations. Give the min no of operations for doing it and also specify the operations in order.
asked
Dec 9, 2017
in
Programming
by
Tuhin Dutta
Loyal
(
7.9k
points)

91
views
datastructure
stack
+2
votes
0
answers
30
Stack
asked
Nov 25, 2017
in
Programming
by
Lakshman Patel RJIT
Loyal
(
8k
points)

70
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
Schedule for GATE 2019
GATE 2019 official website
Correct way of preparation
Right process to start solving MCQs in Comp.Sc.
UGC NET JULY 2018 Results
Follow @csegate
Gatecse
Recent questions tagged stack
Recent Blog Comments
Books are there but don't think any will leave ...
Sir i have placed the order Details are PAYMENT ...
Sir i am placing order for gate overflew book ...
Yes, their tracking system is incomplete. ...
India post don't update the tracking details. No ...
38,084
questions
45,574
answers
132,084
comments
49,062
users