Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged data-structures
6
6 votes
1
1 answer
218
218 views
GO Classes DPP | GATE CS, DA | Data Structure | Traversal Logic
A binary tree has:Left subtree containing $1000$ nodes Right subtree containing $100$ nodesHow many nodes are processed before the root in preorder, inorder, and postorde...
GO Classes
218
views
asked
Jul 13
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-223
goclasses-cs-dpp
goclasses-cs-dpp-day-321
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-tree
tree-traversal
+
–
5
5 votes
2
2 answers
221
221 views
GO Classes DPP | GATE CS, DA | Data Structure | Tree Traversal
A binary tree has the following traversals:Preorder traversal $: \text{A M P K L D H T}$ Inorder traversal $:\text{P M L K A H T D}$Which of the following is the postorde...
GO Classes
221
views
asked
Jul 13
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-223
goclasses-cs-dpp
goclasses-cs-dpp-day-321
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
tree-traversal
+
–
7
7 votes
1
1 answer
185
185 views
GO Classes DPP | GATE CS | Data Structure | Binary Tree Nodes
Which of the following functions correctly returns the total number of nodes in a binary tree rooted at $\texttt{t}$?int tree_size(TreeNode *t) { if (t == NULL) return 0;...
GO Classes
185
views
asked
Jul 13
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-321
data-structures
goclasses-ds-practice-questions
binary-tree
+
–
6
6 votes
1
1 answer
178
178 views
GO Classes DPP | GATE CS, DA | Data Structure | Traversal Output
Consider the following binary tree:Which option correctly gives the preorder, postorder, inorder, and level-order traversals?Preorder $:\texttt{9 15 23 12 8 6 2 7 10 5 35...
GO Classes
178
views
asked
Jul 13
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-223
goclasses-cs-dpp
goclasses-cs-dpp-day-321
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-tree
tree-traversal
+
–
6
6 votes
1
1 answer
158
158 views
GO Classes DPP | GATE CS, DA | Data Structure | Postorder Traversal
Consider the following binary search tree:If we traverse the tree in postorder and print only the key values that are greater than $12$ and less than $20$, what will be t...
GO Classes
158
views
asked
Jul 13
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-223
goclasses-cs-dpp
goclasses-cs-dpp-day-321
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
tree-traversal
+
–
11
11 votes
1
1 answer
242
242 views
GO Classes DPP | GATE CS | Data Structures | Complete Binary Tree
Which of the following can be the number of nodes in a complete binary tree?$2$ $5$ $7$ $8$
GO Classes
242
views
asked
Jul 11
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-320
data-structures
goclasses-ds-practice-questions
binary-tree
multiple-selects
+
–
6
6 votes
1
1 answer
200
200 views
GO Classes DPP | GATE CS, DA | Data Structure | Nearly Balanced Tree
A node of a binary tree is called nearly balanced if one of the following holds:The node is a leaf. The node has one child and that child is a leaf. The node has two chil...
GO Classes
200
views
asked
Jul 11
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-223
goclasses-cs-dpp
goclasses-cs-dpp-day-320
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-tree
+
–
6
6 votes
2
2 answers
231
231 views
GO Classes DPP | GATE CS, DA | Data Structure | Complete Tree Array
A complete binary tree is stored in an array using $\mathbf{1}$-based indexing, where the root is stored at index $1$.For a node stored at index $11$, which of the follow...
GO Classes
231
views
asked
Jul 11
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-222
goclasses-cs-dpp
goclasses-cs-dpp-day-320
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-tree
multiple-selects
+
–
7
7 votes
1
1 answer
193
193 views
GO Classes DPP | GATE CS, DA | Data Structure | Height and Leaves
A binary tree has height $4$, where height is measured as the maximum number of edges from the root to a leaf.Can such a binary tree have exactly $8$ leaves?Yes, because ...
GO Classes
193
views
asked
Jul 11
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-222
goclasses-cs-dpp
goclasses-cs-dpp-day-320
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-tree
+
–
6
6 votes
1
1 answer
189
189 views
GO Classes DPP | GATE CS, DA | Data Structure | Full Binary Tree
Is it possible to construct a full binary tree with exactly $8$ internal nodes and $7$ leaves?Yes No
GO Classes
189
views
asked
Jul 11
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-222
goclasses-cs-dpp
goclasses-cs-dpp-day-320
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-tree
+
–
7
7 votes
1
1 answer
304
304 views
GO Classes DPP | GATE CS, DA | Data Structure | Stack Implementation & DFS
Assume there are $n$ elements in the data structure. Consider the following statements:$\text{S1}:$ A stack can be implemented using a linked list such that each individu...
GO Classes
304
views
asked
Jul 10
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-222
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
+
–
4
4 votes
1
1 answer
192
192 views
GO Classes DPP | GATE CS, DA | Data Structure | Queue Order
Suppose a client performs an intermixed sequence of $\texttt{enqueue}$ and $\texttt{dequeue}$ operations on a queue. The enqueue operations put the integers $0$ through $...
GO Classes
192
views
asked
Jul 10
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
queue
multiple-selects
+
–
8
8 votes
3
3 answers
239
239 views
GO Classes DPP | GATE CS | Data Structures | Postfix to Infix
Consider the following postfix expression:$\texttt{1 2 3 + 4 5 * * +}$Which of the following fully parenthesized infix expressions is equivalent to it?$\texttt{( 1 + ( ( ...
GO Classes
239
views
asked
Jul 9
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-318
data-structures
goclasses-ds-practice-questions
infix
postfix-expression
+
–
6
6 votes
3
3 answers
200
200 views
GO Classes DPP | GATE CS | Data Structures | Prefix Postfix
Consider the following prefix expression:$\texttt{+ * 2 3 / 8 4}$Which of the following is its correct postfix form?$\texttt{2 3 * 8 4 / +}$$\texttt{+ * 2 3 / 8 4}$$\text...
GO Classes
200
views
asked
Jul 9
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-318
data-structures
goclasses-ds-practice-questions
prefix
postfix-expression
+
–
7
7 votes
2
2 answers
189
189 views
GO Classes DPP | GATE CS | Data Structures | Infix to Prefix
For the expression:$\texttt{2 * 3 + 8 / 4}$Assume the expression tree has $\texttt{+}$ as the root, $\texttt{*}$ as the left subtree root, and $\texttt{/}$ as the right s...
GO Classes
189
views
asked
Jul 9
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-318
data-structures
goclasses-ds-practice-questions
infix-prefix
+
–
5
5 votes
2
2 answers
182
182 views
GO Classes DPP | GATE CS | Data Structures | Postfix Value
Evaluate the following postfix expression:$\texttt{3 4 5 + *}$Enter the numerical value.
GO Classes
182
views
asked
Jul 9
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-318
data-structures
goclasses-ds-practice-questions
postfix-expression
numerical-answers
+
–
6
6 votes
3
3 answers
201
201 views
GO Classes DPP | GATE CS | Data Structures | Infix to Postfix
Convert the following fully parenthesized infix expression into postfix form:$\texttt{( 2 + ( ( 3 + 4 ) * ( 5 * 6 ) ) )}$Which of the following is the correct postfix exp...
GO Classes
201
views
asked
Jul 9
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-318
data-structures
goclasses-ds-practice-questions
infix
postfix-expression
+
–
5
5 votes
2
2 answers
242
242 views
GO Classes DPP | GATE CS, DA | Data Structure | Balanced Brackets
A stack is used to check whether parentheses, braces, and brackets are properly balanced.Consider the following two inputs:Input $1: \texttt{[()]\{\}\{[()()]()\}}$Input $...
GO Classes
242
views
asked
Jul 9
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-219
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
+
–
6
6 votes
3
3 answers
310
310 views
GO Classes DPP | GATE CS, DA | Data Structure | Stack Permutation
Suppose an intermixed sequence of stack push and pop operations is performed. The push operations push the integers $0$ through $9$ in order. The pop operations print the...
GO Classes
310
views
asked
Jul 8
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-219
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
multiple-selects
+
–
7
7 votes
3
3 answers
282
282 views
GO Classes DPP | GATE CS, DA | Data Structure | Stack Output
A stack client reads tokens from left to right. If the token is a word, it is pushed onto the stack. If the token is $\texttt{-}$, one item is popped and printed.Consider...
GO Classes
282
views
asked
Jul 8
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-219
goclasses-cs-dpp
goclasses-cs-dpp-day-319
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
stack
+
–
7
7 votes
3
3 answers
316
316 views
GO Classes DPP | GATE CS | Data Structures | Queue Using Stacks
A queue is implemented using two stacks $\text{S1}$ and $\text{S2}$.Use the implementation where $\texttt{dequeue()}$ is $\text{O(1)}$ by keeping the front of the queue a...
GO Classes
316
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
stack
+
–
4
4 votes
2
2 answers
195
195 views
GO Classes DPP | GATE CS | Data Structures | Circular Queue
Suppose a circular queue of capacity $(n - 1)$ elements is implemented with an array of $n$ elements.Insertion and deletion operations are carried out using $\texttt{REAR...
GO Classes
195
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
+
–
6
6 votes
3
3 answers
195
195 views
GO Classes DPP | GATE CS | Data Structures | Circular Linked List Queue
A FIFO queue is represented using a circular linked list and only one external pointer $\text{Q}$.Design $1: \text{Q}$ points to the node containing the front item. Desig...
GO Classes
195
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
circular-queue
+
–
8
8 votes
2
2 answers
217
217 views
GO Classes DPP | GATE CS | Data Structures | Array Queue
Consider an array implementation of a queue. Suppose we try to keep all items at the front of a partially-filled array, so that $\texttt{data[0]}$ is always the front of ...
GO Classes
217
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
+
–
6
6 votes
3
3 answers
195
195 views
GO Classes DPP | GATE CS | Data Structures | Queue Stack Trace
Consider an initially empty stack $\text{S}$ and an initially empty queue $\text{Q}$.The following operations are performed:S.push(5) S.push(6) S.push(S.top()) S.push(7) ...
GO Classes
195
views
asked
Jul 8
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-317
data-structures
goclasses-ds-practice-questions
queue
+
–
7
7 votes
4
4 answers
245
245 views
GO Classes DPP | GATE CS | Data Structures | Infix Postfix
Convert the following infix expression into postfix expression:$$\texttt{a + (b - c) - d * ((e - f) / g + h)}$$Which of the following is correct?$\texttt{a b c - + d e f ...
GO Classes
245
views
asked
Jul 7
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-316
data-structures
goclasses-ds-practice-questions
postfix-notation
infix
+
–
6
6 votes
2
2 answers
233
233 views
GO Classes DPP | GATE CS | Data Structures | Postfix Prefix
Which of the following statements is true about arithmetic expressions?Parentheses are needed in all arithmetic expressions. Infix expressions do not require precedence r...
GO Classes
233
views
asked
Jul 7
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-316
data-structures
goclasses-ds-practice-questions
stack
+
–
5
5 votes
2
2 answers
211
211 views
GO Classes DPP | GATE CS | Data Structures | Stack Permutation
Which of the following permutations can be obtained in the same order using a stack, assuming the input sequence is:$$5, 6, 7, 8, 9$$$7, 8, 9, 5, 6$ $5, 9, 6, 7, 8$ $7, 8...
GO Classes
211
views
asked
Jul 7
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-316
data-structures
goclasses-ds-practice-questions
stack
+
–
4
4 votes
2
2 answers
211
211 views
GO Classes DPP | GATE CS | Data Structures | Stack Operation Trace
If the following sequence of operations is performed on an initially empty stack:push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), popwhat is the sequence ...
GO Classes
211
views
asked
Jul 7
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-316
data-structures
goclasses-ds-practice-questions
stack
+
–
5
5 votes
3
3 answers
219
219 views
GO Classes DPP | GATE CS | Data Structures | Push Pop Trace
An initially empty stack undergoes the following operations:push(40) push(10) push(10) push(pop() + pop()) push(20) push(5) push(pop() / pop())Assume the division operati...
GO Classes
219
views
asked
Jul 7
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-316
data-structures
goclasses-ds-practice-questions
stack
+
–
Page:
« prev
1
2
3
4
5
6
7
8
...
86
next »