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

4 4 votes
2 2 answers
841
841 views
Consider a hash table of size $11$ that uses the hash function\[h(x)=(x+7)\bmod 11\]Keys are inserted in the order\[13,\,22,\,15,\,11,\,29,\,39,\,44\]The collision resolu...
4 4 votes
1 1 answer
1.1k
1.1k views
The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree.What is the maximum possible height of a full binary tree with ...
2 2 votes
1 1 answer
750
750 views
Let P be the set of all integers from $1$ to $15$. Consider any order of insertion of the elements of P into a binary search tree that creates a CBT. Which one of the fol...
4 4 votes
1 1 answer
853
853 views
The following sequence corresponds to the preorder traversal of a BST : $$T: 50, 25, 13, 40, 30, 47, 75, 60, 70, 80, 77$$The position of the element $60$ in the postorder...
2 2 votes
1 1 answer
682
682 views
Consider the following code snippet in the C language that computes the number of nodes in a nonempty S.L.L. pointed by the pointer variable $\verb|head.struct node|$ { ...
1 1 vote
1 1 answer
534
534 views
Consider a min heap containing $n$ elements represented as an array, where $n>100$ and $n$ is odd.Assuming $1$-based indexing, which of the following cannot be the index ...
2 2 votes
0 0 answers
492
492 views
1 1 vote
0 0 answers
508
508 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
1 1 answer
456
456 views
Stack $\mathrm{S}$ and Queue $\mathrm{Q}$, both are initially empty. Each has sufficient capacity to handle all elements.Elements are inserted only in the order: $1,2,3,4...
1 1 vote
1 1 answer
508
508 views
Using Hashing, with chaining (when collision occur). After inserting the following numbers what is the length of longest chain is?$$28,19,10,12,5,15,33,26,17$$Hash functi...
1 1 vote
1 1 answer
462
462 views
$\text{Match the following :}$\[\begin{array}{lcl}\text{List I} & &\text{List II} \\A.\text{Inorder} & &P.\ \text{Left subtree, Root, Right subtree} \\B.\text{Preorder} &...
1 1 vote
2 answers 2 answers
372
372 views
Suppose 5 distinct keys are inserted into an empty Binary Search Tree (BST) in random order. What is the probability that the resulting BST is completely skewed (i.e., ev...
1 1 vote
1 1 answer
282
282 views
 Could someone confirm the order and please explain it ?
3 3 votes
2 2 answers
447
447 views
A hash table of size 11 using the hash function h(x)=x mod 11 and quadratic probing with hi(x)=(h(x)+i^2)  mod 11 , i∈{0,1,2,…,10}.The key values are given in the followi...
2 2 votes
1 answers 1 answer
280
280 views
Which of the following is/are dynamic data structure?A) Linked listB) StackC) ArrayD) Binary tree
1 1 vote
1 1 answer
224
224 views
Given the structure of a heap as sketched below, where the second-smallest value in the set is marked.Tell the total valid position for 4th smallest value in the Min heap...
2 2 votes
1 1 answer
302
302 views
A GO Tree is a rooted binary tree defined as follows:For every node $u$ (except the root): Let parent $(u)$ be the parent of $u$.Define:$\operatorname{Side}(u)=0$ if $u$ ...
1 1 vote
2 2 answers
260
260 views
No. of binary trees possible with height 3 and only 1 leaf node ? How to solve this question...
4 4 votes
1 1 answer
547
547 views
Someone help with this...I am getting option-b but key is opt-aa)b)c)d)
1 1 vote
1 1 answer
307
307 views
A hash table of size m=13m = 13m=13 usesh(k,i)=(k mod 13+i(1+k mod 11)) mod 13h(k, i) = (k \bmod 13 + i(1 + k \bmod 11)) \bmod 13h(k,i)=(kmod13+i(1+kmod11))mod13What is t...