Webpage

Arrays, Stacks, Queues, Linked lists, Trees, Binary search trees, Binary heaps, Graphs.

$$\scriptsize{\overset{{\large{\textbf{Mark Distribution in Previous GATE}}}}{\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}\hline \textbf{Year}& \textbf{2026 - 1}& \textbf{2026 - 2}& \textbf{2025 - 1}& \textbf{2025 - 2}& \textbf{2024 - 1}& \textbf{2024 - 2}& \textbf{2023}& \textbf{2022}& \textbf{2021 - 1}& \textbf{2021 - 2}&\textbf{Minimum}&\textbf{Average}&\textbf{Maximum}\\\hline \textbf{1 Mark Count}&0&1&3&2&0&0&2&2&4&2&0&1.6&4\\\hline \textbf{2 Marks Count}&1&1&1&2&1&2&3&1&1&0&0&1.3&3\\\hline \textbf{Total Marks}&2&3&5&6&2&4&8&4&6&2&\bf{2}&\bf{4.2}&\bf{8}\\\hline \end{array}}}$$

Recent questions in Data Structures

3 3 votes
1 1 answer
208
208 views
The following hexadecimal data items are inserted into a hash table in the given order:$\text{1A, ~35, ~3B, ~54, ~8E, ~A1, ~AF, ~B2, ~B3}$The hash value is computed usin...
3 3 votes
1 1 answer
168
168 views
A hash table $\texttt{hashArray}$ has $5$ positions, indexed from $1$ to $5$. Initially,$\texttt{hashArray = \{-1, -1, -1, -1, -1\}}$The value $\texttt{-1}$ means that th...
4 4 votes
1 1 answer
159
159 views
Which of the following are open addressing approaches for resolving collisions in a hash table?Linear probing Quadratic probing Exponential hashing Separate chaining
3 3 votes
1 1 answer
171
171 views
A hash table uses open addressing with linear probing. Suppose a key is deleted from the table.Why should we not simply replace the deleted key’s slot by $\text{NULL}$?Be...
3 3 votes
1 1 answer
166
166 views
A hash table of size $5$ uses open addressing with linear probing.The probing function is:$H(k,i) = (k+i) \bmod 5$where $i$ is the collision count.Insert the keys in the ...
2 2 votes
1 1 answer
197
197 views
Consider the following statements about hash tables.$\text{S1}:$ The worst-case complexity of checking whether an object is present in a hash set is $O(1)$.$\text{S2}:$ T...
3 3 votes
1 1 answer
199
199 views
A hash table has $m$ slots and stores $n$ keys. Assume simple uniform hashing. Collisions are resolved by chaining.What is the expected number of slots that end up non-em...
3 3 votes
1 1 answer
182
182 views
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...
2 2 votes
1 1 answer
186
186 views
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...
4 4 votes
2 2 answers
229
229 views
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...
6 6 votes
2 2 answers
293
293 views
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...
4 4 votes
2 2 answers
236
236 views
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...
5 5 votes
2 2 answers
247
247 views
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?$...
6 6 votes
3 3 answers
238
238 views
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...
5 5 votes
2 2 answers
209
209 views
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...
2 2 votes
1 1 answer
167
167 views
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...
4 4 votes
1 1 answer
218
218 views
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 ...
4 4 votes
1 1 answer
192
192 views
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...
5 5 votes
3 3 answers
298
298 views
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...
4 4 votes
1 1 answer
190
190 views
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...