Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged python-&-dsa
2
2 votes
1
1 answer
180
180 views
GO Classes DPP | GATE CS, DA | Data Structure | Uniform Hashing
A hash table has $m$ slots and stores $n$ keys. Assume simple uniform hashing, so each key is equally likely to hash into any slot, independently of other keys. Collision...
GO Classes
180
views
asked
Jul 16
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-226
goclasses-cs-dpp
goclasses-cs-dpp-day-324
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
uniform-hashing
+
–
2
2 votes
1
1 answer
179
179 views
GO Classes DPP | GATE CS, DA | Data Structure | Collision-Free Hash Parameter
For the keys : $\text{47, 61, 36, 52, 56, 33, 92}$Suppose the hash function is :$h(k) = ((10k + 4) \bmod c) \bmod 7$where $c$ is a positive integer.What is the smallest v...
GO Classes
179
views
asked
Jul 16
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-226
goclasses-cs-dpp
goclasses-cs-dpp-day-324
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
hashing
numerical-answers
+
–
4
4 votes
2
2 answers
225
225 views
GO Classes DPP | GATE CS, DA | Data Structure | Hashing With Chaining
Insert the integer keys$47, 61, 36, 52, 56, 33, 92$in the given order into a hash table of size $7$.The hash function is:$h(k) = (10k + 4) \bmod 7$Collisions are resolved...
GO Classes
225
views
asked
Jul 16
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-226
goclasses-cs-dpp
goclasses-cs-dpp-day-324
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
hashing
+
–
6
6 votes
2
2 answers
290
290 views
GO Classes DPP | GATE CS, DA | Data Structure | Inorder Predecessor & Successor
In a binary tree $T$, nodes $p$, $q$, and $v$ appear in the inorder traversal as:$\ldots, p, v, q, \ldots$Node $v$ has both a left child and a right child.Which of the fo...
GO Classes
290
views
asked
Jul 15
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-225
goclasses-cs-dpp
goclasses-cs-dpp-day-323
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
+
–
4
4 votes
2
2 answers
234
234 views
GO Classes DPP | GATE CS, DA | Data Structure | BST Search
A Binary Search Tree has $15$ nodes. Every node except those at the lowest level has both a left child and a right child.A key is searched in this BST. The key may or may...
GO Classes
234
views
asked
Jul 15
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-225
goclasses-cs-dpp
goclasses-cs-dpp-day-323
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
+
–
5
5 votes
2
2 answers
243
243 views
GO Classes DPP | GATE CS, DA | Data Structure | Ordering of Keys in BST
The following tree is a Binary Search Tree. The values $\text{a}$ to $\text{g}$ are all distinct.Which of the following gives the correct increasing order of the values?$...
GO Classes
243
views
asked
Jul 15
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-225
goclasses-cs-dpp
goclasses-cs-dpp-day-323
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
+
–
6
6 votes
2
2 answers
228
228 views
GO Classes DPP | GATE CS, DA | Data Structure | BST Properties
Consider the following statements about Binary Search Trees.$\text{S1}:$ The largest value of a BST is the last value in the list produced by an inorder traversal. $\text...
GO Classes
228
views
asked
Jul 15
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-225
goclasses-cs-dpp
goclasses-cs-dpp-day-323
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
+
–
5
5 votes
2
2 answers
206
206 views
GO Classes DPP | GATE CS, DA | Data Structure | BST Deletion
Consider the following Binary Search Tree:The root node $7$ is deleted using a standard BST deletion algorithm. Which of the following values can become the new root whil...
GO Classes
206
views
asked
Jul 15
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-225
goclasses-cs-dpp
goclasses-cs-dpp-day-323
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
multiple-selects
+
–
2
2 votes
1
1 answer
166
166 views
GO Classes DPP | GATE DA | Python & DSA | Postorder Traversal
The following keys are inserted into an empty Binary Search Tree in the given order:$\texttt{70, 11, 47, 81, 20, 61, 10, 12, 13, 62}$ What is the postorder traversal of t...
GO Classes
166
views
asked
Jul 14
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-224
python-&-dsa
goclasses-python-&-dsa-practice-questions
binary-search-tree
tree-traversal
+
–
4
4 votes
1
1 answer
215
215 views
GO Classes DPP | GATE CS, DA | Data Structure | BST Search Complexity
Consider the following statement:“$\text{Searching for an element in a balanced Binary Search Tree with N nodes will require exactly}$ $\mathrm{\log (N)}$ $\text{compare ...
GO Classes
215
views
asked
Jul 14
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-224
goclasses-cs-dpp
goclasses-cs-dpp-day-322
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
+
–
4
4 votes
1
1 answer
189
189 views
GO Classes DPP | GATE CS, DA | Data Structure | BST Search
The following strings are inserted into an empty Binary Search Tree in the given order, using normal lexicographic dictionary order:$\text{Paris, London, Rome, Vienna, Du...
GO Classes
189
views
asked
Jul 14
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-224
goclasses-cs-dpp
goclasses-cs-dpp-day-322
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
+
–
5
5 votes
3
3 answers
289
289 views
GO Classes DPP | GATE CS, DA | Data Structure | BST Height
Assume height is counted as the number of nodes on the longest root-to-leaf path.A Binary Search Tree contains exactly $403$ nodes.Which option gives the minimum possible...
GO Classes
289
views
asked
Jul 14
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-224
goclasses-cs-dpp
goclasses-cs-dpp-day-322
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
height
+
–
4
4 votes
1
1 answer
188
188 views
GO Classes DPP | GATE CS, DA | Data Structure | BST Property
Which of the following statements about Binary Search Trees is correct?If $\texttt{y}$ is in the left subtree of node $\texttt{x}$, then $\texttt{y.key >= x.key}$. If $\t...
GO Classes
188
views
asked
Jul 14
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-224
goclasses-cs-dpp
goclasses-cs-dpp-day-322
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
+
–
4
4 votes
2
2 answers
286
286 views
GO Classes DPP | GATE CS, DA | Data Structure | BST Postorder Update
The postorder traversal of a binary search tree is:$\text{1, 12, 4, 22, 18, 16}$What is the new postorder traversal after inserting $10$ and $14$ into the BST?$\text{1, 1...
GO Classes
286
views
asked
Jul 13
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-223
goclasses-cs-dpp
goclasses-cs-dpp-day-322
data-structures
python-&-dsa
goclasses-python-&-dsa-practice-questions
goclasses-ds-practice-questions
binary-search-tree
tree-traversal
+
–
6
6 votes
1
1 answer
229
229 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
229
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
231
231 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
231
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
+
–
6
6 votes
1
1 answer
187
187 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
187
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
167
167 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
167
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
+
–
6
6 votes
1
1 answer
210
210 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
210
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
242
242 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
242
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
202
202 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
202
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
206
206 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
206
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
+
–
0
0 votes
1
1 answer
110
110 views
GO Classes DPP | GATE DA | Python & DSA | Nested Dictionary
Consider the following dictionary:goals = {"Country":{"Ronaldo":123,"Messi":103,"Pele":83}, "Club":{"Ronaldo":[512,51,158],"Pele":[604,49,26]}}Which of the following stat...
GO Classes
110
views
asked
Jul 11
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-222
python-&-dsa
goclasses-python-&-dsa-practice-questions
data-dictionary
+
–
7
7 votes
1
1 answer
323
323 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
323
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
+
–
0
0 votes
1
1 answer
109
109 views
GO Classes DPP | GATE DA | Python & DSA | FIFO Trace
A queue follows FIFO order. Consider the following operations on an initially empty queue:q = [] q.append("A") q.append("B") q.append("C") x = q.pop(0) q.append("D") y = ...
GO Classes
109
views
asked
Jul 10
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
python-&-dsa
goclasses-python-&-dsa-practice-questions
queue
+
–
0
0 votes
1
1 answer
146
146 views
GO Classes DPP | GATE DA | Python & DSA | Queue with Two Stacks
A queue is to be implemented using two stacks and only a constant amount of extra memory. Which of the following correctly implements queue behavior with constant amortiz...
GO Classes
146
views
asked
Jul 10
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
python-&-dsa
goclasses-python-&-dsa-practice-questions
queue
stack
+
–
0
0 votes
1
1 answer
91
91 views
GO Classes DPP | GATE DA | Python & DSA | Rear Cost
Give the running time of each operation in the following queue class, where the item most recently inserted is at $\texttt{_a[0]}$.class Queue: def __init__(self): self._...
GO Classes
91
views
asked
Jul 10
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
python-&-dsa
goclasses-python-&-dsa-practice-questions
queue
+
–
0
0 votes
1
1 answer
89
89 views
GO Classes DPP | GATE DA | Python & DSA | Front Cost
Give the running time of each operation in the following queue class, where the item least recently inserted is at $\texttt{_a[0]}$.class Queue: def __init__(self): self....
GO Classes
89
views
asked
Jul 10
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-221
python-&-dsa
goclasses-python-&-dsa-practice-questions
queue
+
–
4
4 votes
1
1 answer
208
208 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
208
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
+
–
2
2 votes
2
2 answers
155
155 views
GO Classes DPP | GATE DA | Python & DSA | Postfix 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
155
views
asked
Jul 9
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-220
python-&-dsa
goclasses-python-&-dsa-practice-questions
infix
postfix-expression
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
12
...
16
next »