Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged stack
1
votes
1
answer
61
NIELIT Scientific Assistant A 2020 November: 115
A recursive problem like tower of hanoi can be rewritten without recursion using: stack priority queue graph cycles
A recursive problem like tower of hanoi can be rewritten without recursion using:stackpriority queuegraphcycles
gatecse
387
views
gatecse
asked
Dec 9, 2020
DS
nielit-sta-2020
data-structures
stack
+
–
1
votes
1
answer
62
GATE Overflow Test Series | Data Structures | Test 1 | Question: 2
Kevin is asked to write a single program to print the inorder, preorder, postorder and level order traversal of a binary tree having $n$ nodes. The best possible time complexity of this function is ___________ $\Theta(n^3)$ $\Theta(n)$ $\Theta(n^2)$ $\Theta(n\log n)$
Kevin is asked to write a single program to print the inorder, preorder, postorder and level order traversal of a binary tree having $n$ nodes. The best possible time com...
gatecse
358
views
gatecse
asked
Aug 9, 2020
DS
go2025-ds-1
stack
+
–
1
votes
1
answer
63
GATE Overflow Test Series | Data Structures | Test 1 | Question: 3
What is the value of the postfix expression $8 \ 7 \ 2 \ 4 \ + \ – \ *?$:
What is the value of the postfix expression $8 \ 7 \ 2 \ 4 \ + \ – \ *?$:
gatecse
185
views
gatecse
asked
Aug 9, 2020
DS
go2025-ds-1
numerical-answers
stack
infix-prefix
+
–
1
votes
1
answer
64
GATE Overflow Test Series | Data Structures | Test 1 | Question: 4
The data structures most suitable to do an inorder and level order traversals of a binary tree respectively are Stack and Queue Queue and Stack Stack and Stack Queue and Queue
The data structures most suitable to do an inorder and level order traversals of a binary tree respectively areStack and QueueQueue and StackStack and StackQueue and Queu...
gatecse
278
views
gatecse
asked
Aug 9, 2020
DS
go2025-ds-1
stack
queue
+
–
1
votes
1
answer
65
GATE Overflow Test Series | Data Structures | Test 1 | Question: 5
The prefix form of $A/B- (C * D * E)$ is? $-/* * ABCDE$ $-/ABCD**DE$ $-/AB**CDE$ $-A/BC*DE*$
The prefix form of $A/B- (C * D * E)$ is?$-/* * ABCDE$$-/ABCD DE$$-/AB CDE$$-A/BC*DE*$
gatecse
160
views
gatecse
asked
Aug 9, 2020
DS
go2025-ds-1
infix-prefix
stack
+
–
1
votes
1
answer
66
GATE Overflow Test Series | Data Structures | Test 1 | Question: 8
If the elements A , B , C and D in order are placed in a queue and stack and are deleted one element at a time (operations to the stack and queue being independent and deletion can happen in between ... their removals from the queue and stack respectively? ABCD, ABCD DCBA, DCBA ABCD, DCBA All the above choices are possible
If the elements “A”, “B”, “C” and “D” in order are placed in a queue and stack and are deleted one element at a time (operations to the stack and queue be...
gatecse
286
views
gatecse
asked
Aug 9, 2020
DS
go2025-ds-1
stack
queue
+
–
4
votes
1
answer
67
GATE Overflow Test Series | Data Structures | Test 1 | Question: 29
Consider a STACK being implemented using two QUEUES by favoring the PUSH operations to POP. If $k$ PUSH operations and $l$ POP operations are done on this STACK with $n$ elements initially $(k,l << n)$, the minimum sum of the corresponding ENQUEUE and DEQUEUE operations will be $O(kl)$ $O(ln)$ $O(k+l)$ $O(k)$
Consider a STACK being implemented using two QUEUES by favoring the PUSH operations to POP. If $k$ PUSH operations and $l$ POP operations are done on this STACK with $n$ ...
gatecse
499
views
gatecse
asked
Aug 9, 2020
DS
go2025-ds-1
stack
+
–
3
votes
2
answers
68
NIELIT 2016 DEC Scientist B (IT) - Section B: 17
Which of the following is the correct order of evaluation for the below expression? $z=x+y^*z/4\%2-1$ $^*/\%+-=$ $=^*/\%+-$ $/^*\%-+=$ $^*\% /-+=$
Which of the following is the correct order of evaluation for the below expression? $z=x+y^*z/4\%2-1$$^*/\%+-=$$=^*/\%+-$$/^*\%-+=$$^*\% /-+=$
admin
2.5k
views
admin
asked
Mar 31, 2020
DS
nielit2016dec-scientistb-it
data-structures
operator-precedence
stack
+
–
3
votes
1
answer
69
NIELIT 2016 DEC Scientist B (IT) - Section B: 30
What data structures is used for depth first traversal of a graph? Queue Stack List None of the above
What data structures is used for depth first traversal of a graph?QueueStackListNone of the above
admin
887
views
admin
asked
Mar 31, 2020
DS
nielit2016dec-scientistb-it
data-structures
stack
depth-first-search
+
–
3
votes
2
answers
70
NIELIT 2016 DEC Scientist B (IT) - Section B: 42
In the ________ traversal we process all of a vertex's descendants before we move to an adjacent vertex. Depth First Breadth First Width First Depth Limited
In the ________ traversal we process all of a vertex's descendants before we move to an adjacent vertex.Depth FirstBreadth FirstWidth FirstDepth Limited
admin
3.1k
views
admin
asked
Mar 31, 2020
DS
nielit2016dec-scientistb-it
data-structures
stack
depth-first-search
+
–
4
votes
3
answers
71
NIELIT 2017 July Scientist B (CS) - Section B: 6
Assume that the operators $+,-,\times$ are left associative and $\wedge$ is right associative. The order of precedence(from highest to lowest) is $\wedge,\times, +,-$ ... $abc\times+de\wedge f\wedge-$ $ab+c\times d-e\wedge f\wedge $ $-+a\times bc\wedge\wedge def$
Assume that the operators $+,-,\times$ are left associative and $\wedge$ is right associative. The order of precedence(from highest to lowest) is $\wedge,\times, +,-$. Th...
admin
1.2k
views
admin
asked
Mar 30, 2020
DS
nielit2017july-scientistb-cs
data-structures
stack
infix-prefix
+
–
1
votes
2
answers
72
UGC NET CSE | December 2006 | Part 2 | Question: 23
What is the time required to insert an element in a stack with linked implementation ? $O (\log_2 n)$ $O (n)$ $O (n\log_2 n)$ $O (1)$
What is the time required to insert an element in a stack with linked implementation ?$O (\log_2 n)$$O (n)$$O (n\log_2 n)$$O (1)$
go_editor
6.3k
views
go_editor
asked
Mar 27, 2020
DS
ugcnetcse-dec2006-paper2
stack
+
–
0
votes
1
answer
73
UGC NET CSE | June 2005 | Part 2 | Question: 21
What is the time required to insert an element in a stack with linked implementation? $O \left(\log_{2}n \right)$ $O \left(n \right)$ $O \left(n \log_{2}n \right)$ $O \left(1 \right)$
What is the time required to insert an element in a stack with linked implementation?$O \left(\log_{2}n \right)$$O \left(n \right)$$O \left(n \log_{2}n \right)$$O \left(1...
go_editor
335
views
go_editor
asked
Mar 26, 2020
DS
ugcnetcse-june2005-paper2
data-structures
linked-list
stack
+
–
1
votes
3
answers
74
UGC NET CSE | January 2017 | Part 2 | Question: 22
The seven elements $A, B, C, D, E,F$ and $G$ are pushed onto a stack in reverse order, i.e., starting from $G$. The stack is popped five times and each element is inserted into a queue. Two elements are deleted from the queue and pushed back onto the stack. Now, one element is popped from the stack. The popped item is ___________. $A$ $B$ $F$ $G$
The seven elements $A, B, C, D, E,F$ and $G$ are pushed onto a stack in reverse order, i.e., starting from $G$. The stack is popped five times and each element is inserte...
go_editor
7.4k
views
go_editor
asked
Mar 24, 2020
DS
ugcnetjan2017ii
data-structures
stack
+
–
3
votes
3
answers
75
ISRO2020-72
A stack is implemented with an array of $'A[0...N-1]'$ and a variable $pos$'. The push and pop operations are defined by the following code. push (x) A[pos] <- x pos <- pos -1 end push pop() pos <- pos+1 return A[pos] end pop ... an empty stack with capacity $N$ for the above implementation $pos \leftarrow -1$ $pos\leftarrow 0$ $pos\leftarrow 1$ $pos\leftarrow N-1$
A stack is implemented with an array of $’A[0...N-1]’$ and a variable ‘$pos$’. The push and pop operations are defined by the following code.push (x) A[pos] <- x ...
Satbir
3.4k
views
Satbir
asked
Jan 13, 2020
DS
isro-2020
data-structures
stack
normal
+
–
4
votes
2
answers
76
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.
Show how to implement a stack using two queues. Analyze the running time of the stack operations.
akash.dinkar12
1.3k
views
akash.dinkar12
asked
Jun 28, 2019
Algorithms
cormen
data-structures
stack
descriptive
+
–
1
votes
1
answer
77
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.
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$....
akash.dinkar12
2.5k
views
akash.dinkar12
asked
Jun 28, 2019
Algorithms
cormen
data-structures
stack
descriptive
+
–
1
votes
1
answer
78
Cormen Edition 3 Exercise 10.1 Question 1 (Page No. 235)
STACK-EMPTY(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 STACK-EMPTY(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]$
STACK-EMPTY(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 STACK-EMPTY(S) 2 error “underflow” 3 else ...
akash.dinkar12
550
views
akash.dinkar12
asked
Jun 28, 2019
Algorithms
cormen
data-structures
stack
descriptive
+
–
1
votes
1
answer
79
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)$
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 instructio...
srestha
770
views
srestha
asked
May 22, 2019
DS
made-easy-test-series
data-structures
stack
+
–
3
votes
3
answers
80
Made Easy Test Series:Data Structure-Stack
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??
There is given a infix expression: ${\color{Red} {1}}$$A+B\times C/\left ( \left ( D+E \right )+F\times G \rig...
srestha
1.1k
views
srestha
asked
May 6, 2019
DS
made-easy-test-series
data-structures
stack
+
–
1
votes
0
answers
81
Stack-DS(Conceptual Doubt)
Is it TRUE or FALSE? Stack allocation can allocate and deallocate dynamic variables and can manage runtime storage
Is it TRUE or FALSE?Stack allocation can allocate and deallocate dynamic variables and can manage runtime storage
srestha
1.6k
views
srestha
asked
Apr 3, 2019
Algorithms
data-structures
stack
+
–
0
votes
0
answers
82
Ullman(2e) Exercise-8.3.2 page no-524 Code Generation
Generate code for the following three-address 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
Generate code for the following three-address statements assuming stack allocation where register SP points to the top of the stackx = 1x=ax = a + 1x = a+bThe two stateme...
aditi19
982
views
aditi19
asked
Apr 1, 2019
Compiler Design
compiler-design
intermediate-code
target-code-generation
stack
pointers
+
–
2
votes
3
answers
83
Programming Stack (ACE)
Runtime stack doesnot contain (A) Local variables (B) Static Variables (C) Parameter Passed (D) Return Address
Runtime stack doesnot contain(A) Local variables(B) Static Variables(C) Parameter Passed(D) Return Address
srestha
1.6k
views
srestha
asked
Mar 1, 2019
Programming in C
stack
+
–
0
votes
1
answer
84
made easy test series
Consider the following expression used to execute on a stack CPU X = (A × B)+C, where all the variables are in the memory. What is the number of zero and one address instructions are required respectively to evaluate the expression? A)5 and 2 B)0 and 7 C)7 and 0 D)2 and 4
Consider the following expression used to execute on a stack CPU X = (A × B)+C, where all the variables are in the memory. What is the number of zero and one address ins...
pream sagar
375
views
pream sagar
asked
Jan 21, 2019
CO and Architecture
co-and-architecture
stack
+
–
1
votes
1
answer
85
Applied Course | Mock GATE | Test 1 | Question: 18
Which of the following is an applications of a stack Reversal of a string. Checking validity of an expression containing nested parameters. Conversion of infix expression to postfix expression form. We can't evaluate prefix expression using stack. I, II and III I and II I, II and IV I, II, III and IV
Which of the following is an applications of a stackReversal of a string.Checking validity of an expression containing nested parameters.Conversion of infix expression to...
Applied Course
580
views
Applied Course
asked
Jan 16, 2019
DS
applied-course-2019-mock1
data-structures
stack
+
–
1
votes
0
answers
86
Applied Course | Mock GATE | Test 1 | Question: 42
What is the maximum number of activation records inserted into stack while converting following infix expression to postfix expression is Infix expression: $\text{7+5*3^2/(9-2^2)+6*4}$
What is the maximum number of activation records inserted into stack while converting following infix expression to postfix expression is Infix expression: $\text{7+5*3^2...
Applied Course
1.0k
views
Applied Course
asked
Jan 16, 2019
DS
applied-course-2019-mock1
numerical-answers
data-structures
stack
infix-prefix
+
–
0
votes
0
answers
87
#madeeasy
A stack based CPU executes the instruction. Memory location 500 contain 0×88 and memory location 700 contain 0×37. Stack pointer is at 0×003F. I1: push 500 I2: push 700 I3: add I4: pop 600 I5: push 300 Then after execution of above instruction the memory location 600 contains _
A stack based CPU executes the instruction. Memory location 500 contain 0×88 and memory location 700 contain 0×37. Stack pointer is at 0×003F.I1: push 500I2: push 700I...
BHOJARAM
414
views
BHOJARAM
asked
Jan 11, 2019
CO and Architecture
co-and-architecture
stack
+
–
0
votes
1
answer
88
# stack
infix ,postfix ,prefix expression evalution stack use as operator or operand?
infix ,postfix ,prefix expression evalution stack use as operator or operand?
amit166
442
views
amit166
asked
Jan 10, 2019
DS
data-structures
stack
infix-prefix
+
–
1
votes
1
answer
89
# stacks
How many enqueue and dequeue operations are required to perform a pop operation if Q1 contains n element initially?
How many enqueue and dequeue operations are required to perform a pop operation if Q1 contains n element initially?
amit166
1.4k
views
amit166
asked
Jan 6, 2019
DS
data-structures
stack
queue
+
–
1
votes
1
answer
90
# iit goa data strructre
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 2 ... 0 8 while i <= 9 do 9 t.insert(s.pop()) 10 t.insert(q.get()) 11 i $\rightarrow$ i + 1 12 end
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...
amit166
508
views
amit166
asked
Jan 4, 2019
DS
queue
stack
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register