Recent questions tagged stack

1 votes
1 answer
94
If two stack is growing two opposite end of array. Then which logic works and how?
1 votes
2 answers
95
Every recursive program uses strictly more stack space compared to its iterative equivalent.This statement is false. Please explain with examples
5 votes
5 answers
97
______ to evaluate an expression without any embedded function calls.Two stacks are requiredone stack is neededThree stacks are requiredMore than three stacks are require...
0 votes
0 answers
99
2 votes
2 answers
100
1 votes
1 answer
101
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() implemen...
1 votes
2 answers
102
2 votes
1 answer
103
0 votes
0 answers
104
Please convert it to postfix by using stack and explain in detailvoid (*bsd_signal(int sig, void (*func)(int)))(int);
1 votes
1 answer
105
While calculating the cost of growable array-based 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 di...
0 votes
0 answers
106
1 votes
1 answer
107
2 votes
0 answers
108
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++) ...
3 votes
2 answers
109
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,6B ) 5,9,6,7,8...
1 votes
2 answers
110
What are the minimum number of pointers required to implement a stack using single ended queue ( the queue is NOT a dequeue )?
1 votes
1 answer
111
Suppose one character at a time comes as an input from a string of letters . There is an option either to 1) print the incoming letter or to 2) put the incoming letter on...
2 votes
1 answer
113
a) Wednesdayb)Tuesdayc)Thursdayd)Fridaye)None of the above
1 votes
1 answer
114
Entries in a stack are "ordered". What is the meaning of this statement?
1 votes
2 answers
115
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?
2 votes
2 answers
116
To remove recursion from a program we have to use which of the following data structure?arraystackqueuelist