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}}}$$

Questions without answers in Data Structures

2 2 votes
0 0 answers
472
472 views
1 1 vote
0 0 answers
489
489 views
Consider a Binary Search Tree (BST) in which all keys are distinct. For a node $v_i$, let $\text{succ}(v_i)$ denote its in-order successor. If $v_i$ has no in-order succe...
1 1 vote
0 0 answers
223
223 views
Which of the following is the primary property of a binary heap?The parent node is greater than its children (max-heap).The parent node is less than its children (min-hea...
1 1 vote
0 0 answers
141
141 views
What is the time complexity for searching an element in a balanced Binary Search Tree?$\text{O}(1)$$\text{O}(\log n)$$\text{O}(n)$$\text{O}(n \log n)$ 
1 1 vote
0 0 answers
249
249 views
1 1 vote
0 0 answers
382
382 views
Consider a hash table with 365 slots (same as the number of days in a year). Assuming uniform hashing, what is the maximum number of keys (n) that can be inserted before ...
2 2 votes
0 0 answers
455
455 views
Consider a binary tree constructed with the condition that for each node the difference between number of nodes in left and right subtrees is at most 1. Consider the heig...
1 1 vote
0 0 answers
205
205 views
The following question appeared in a quiz:"Write the code for a function SecondBest $(A, n)$ that takes an array $A$ and a positive integer $n$ as arguments. The elements...
1 1 vote
0 0 answers
222
222 views
A binary search tree is a binary tree whose proper subtrees are binary search trees, and whose root is strictly greater than all elements in the left subtree, and strictl...
0 0 votes
0 0 answers
206
206 views
Dom is 𝐴 𝑝𝑎𝑟s𝑒𝑟 𝑆𝑝𝑒𝑐𝑖𝑓𝑖𝑐𝑎𝑡𝑖𝑜𝑛 𝐶𝑜𝑑𝑖𝑛𝑔 𝑠𝑡𝑦𝑙𝑒 𝑁𝑜𝑛𝑒 𝑜𝑓 𝑡ℎ𝑒𝑠𝑒
1 1 vote
0 0 answers
155
155 views
Let $\mathcal{B}$ be a binary search tree (BST) on eight nodes filled with the following set of eight integer keys $A=\{10,2,5,3,20,15,9,22\}$. The order in which these k...
1 1 vote
0 0 answers
480
480 views
Generally in B-Tree insertion we are doing Node splitting(if a node has more than max keys than its median element goes up and splits the tree)In the example 11 is insert...
0 0 votes
0 0 answers
399
399 views
Suppose that the following is a binary search tree. The letters indicate the names of the nodes, not the values that are stored. What is the predecessor node, in terms ...
0 0 votes
0 0 answers
803
803 views
Suppose that we use a linked list to represent a queue and that in addition to the enqueue and dequeue functions add a new operation to the queue that deletes the last el...
0 0 votes
0 0 answers
648
648 views
Data Structure question: Binary tree question having four options involving no of internal nodes, leaf nodes, height etc.
0 0 votes
0 0 answers
461
461 views
Suppose a circular queue of capacity ( $\mathrm{n}-1)$ elements is implemented with an array of $\mathrm{n}$ elements. Assume that the insertion and deletion operations a...
0 0 votes
0 0 answers
398
398 views
A $\text{B}$-tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then maximum number of node...
0 0 votes
0 0 answers
700
700 views
What is the smallest and largest number of entries for 2-3 BTree (B2-3 Tree) of height 8 (i.e., 8 levels) ?255 and 6560127 and 2186 6561 and 255255 and 2186
0 0 votes
0 0 answers
564
564 views
The total number of binary trees possible with height n - 2 having n nodes are?(2n - 5)^ 2n - 3 (2n - 7)^2n - 3(n - 3) ^2n - 2(2n - 7)^ 2n - 2
0 0 votes
0 0 answers
622
622 views
2 2 votes
0 0 answers
900
900 views
AVL tree is binary search tree with additional property that difference between height of left sub-tree and right sub-tree of any node can’t be more than 1 if n is the nu...
1 1 vote
0 0 answers
740
740 views
A hash function h maps 16-bit inputs to 8 bit hash values. What is the largest k such that in any set of 1000 inputs, there are atleast k inputs that h maps to the same h...
1 1 vote
0 0 answers
1.7k
1.7k views
The number of nodes of height $\mathrm{h}$ in any $\mathrm{n}$-element heap is atmost:$n / 2^{n+1}$$\frac{n}{2^{h-1}}$$\frac{n}{2^{h}}$$\frac{n-1}{2^{h-1}}$
0 0 votes
0 0 answers
675
675 views
Consider a B-tree of height h. minimum degree $t \geq 2$ that contains any $\mathrm{n}$-key, where $n \geq 1$. Which of the following is correct?$h \geq \log _{t} \frac{n...
0 0 votes
0 0 answers
534
534 views
Not able to understand the last option.
0 0 votes
0 0 answers
543
543 views
Compute the running time for the following algorithmALGORITHM RKU(a,k,n)//Input: a is an array of n element and k is a value{if( k == n) then{WRITE(a[1:n]);return 0;}else...
0 0 votes
0 0 answers
721
721 views
how to Implement arrays using linked lists (and vice versa)?Like if we implement a linked list using an array….then we can maintain two arrays.In one array we will mainta...
0 0 votes
0 0 answers
597
597 views
Can we use BFT for finding no. of connected components in a directed as well as undirected graph?
3 3 votes
0 0 answers
953
953 views
A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let $n$ denote the number of node...
0 0 votes
0 0 answers
745
745 views
A single array $A[1 \ldots \text{MAXSIZE}]$ is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables $\text{top 1}$ and $\text{top ...
To see more, click for the full list of questions or popular tags.