Webpage

$$\small{\overset{{\large{\textbf{Mark Distribution in Previous GATE}}}}{\begin{array}{|c|c|c|c|c|c|c|c|}\hline \textbf{Year}&\textbf{2019}&\textbf{2018}&\textbf{2017-1}&\textbf{2017-2}&\textbf{2016-1}&\textbf{2016-2}&\textbf{Minimum}&\textbf{Average}&\textbf{Maximum} \\\hline\textbf{1 Mark Count}&0&2&3&1&1&1&0&1.3&3 \\\hline\textbf{2 Marks Count}&2&0&0&1&3&3&0&1.5&3 \\\hline\textbf{Total Marks}&4&2&3&3&7&7&\bf{2}&\bf{4.3}&\bf{7}\\\hline \end{array}}}$$

# Recent questions in DS

1
A complete $n$-ary tree is a tree in which each node has $n$ children or no children. Let $I$ be the number of internal nodes and $L$ be the number of leaves in a complete $n$-ary tree. If $L=41$, and $I=10$, what is the value of $n$? $3$ $4$ $5$ $6$
2
In a binary max heap containing $n$ numbers, the smallest element can be found in ______ $O(n)$ $O(\log _2 n)$ $O(1)$ $O(\log_2 \log_2 n)$
3
Which of the following statements are true? Minimax search is breadth-first; it processes all the nodes at a level before moving to a node in next level. The effectiveness of the alpha-beta pruning is highly dependent on the order in which the states are examined The alpha-beta search algorithms computes the same ... and $(c)$ only $(a)$ and $(d)$ only $(b)$ and $(c)$ only $(c)$ and $(d)$ only
4
Match $\text{List I}$ with $\text{List II}$ Let $R_1=\{(1,1), (2,2), (3,3)\}$ and $R_2=\{(1,1), (1,2), (1,3), (1,4)\}$ ... answer from the options given below: $A-I, B-II, C-IV, D-III$ $A-I, B-IV, C-III, D-II$ $A-I, B-III, C-II, D-IV$ $A-I, B-IV, C-II, D-III$
5
A hash table with $10$ buckets with one slot per bucket is depicted. The symbols, $S1$ to $S7$ are initially emerged using a hashing function with linear probing. Maximum number of comparisons needed in searching an item that is not present is $6$ $5$ $4$ $3$
6
A full binary tree with $n$ non-leaf nodes contains $\log_ 2 n$ nodes $n+1$ nodes $2n$ nodes $2n+1$ nodes
7
We have a binary heap on $n$ elements and wish to insert $n$ more elements (not necessarily one after another) into this heap. Total time required for this is $\Theta (\log n)$ $\Theta (n)$ $\Theta (n \log n)$ $\Theta (n^{2})$
8
You are given the postorder traversal, $P$, of a binary search tree on the $n$ elements $1,2,\dots,n.$ You have to determine the unique binary search tree that has $P$ as its postorder traversal. What is the time complexity of the most efficient algorithm for doing this? $\Theta(\log n)$ $\Theta(n)$ $\Theta(n \log n)$ None of the above, as the tree cannot be uniquely determined.
9
Consider the process of inserting an element into a $Max\ Heap$, where the $Max\ Heap$ is represented by an $array$. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of $comparisons$ performed is $\Theta(\log _{2}n)$ $\Theta(n\log _{2} \log_2 n)$ $\Theta (n)$ $\Theta(n\log _{2}n)$
10
In a circularly linked list organization, insertion of a record involves the modification of no pointer $1$ pointer $2$ pointers $3$ pointers
11
To sort many large objects or structures, it would be most efficient to place them in an array and sort the array pointers to them in an array and sort the array them in a linked list and sort the linked list references to them in an array and sort the array
12
The average search time of hashing, with linear probing will be less if the load factor is far less than one equals one is far greater than one none of these
13
The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number number of nodes in a binary tree of height $h$ is $2^{h}$ $2^{h-1} – 1$ $2^{h+1} – 1$ $2^{h+1}$
14
Which of the following is useful in traversing a given graph by breadth first search? Stack Set List Queue
15
If queue is implemented using arrays, what would be the worst run time complexity of queue and dequeue operations? $O(n),O(n)$ $O(n),O(1)$ $O(1),O(n)$ $O(1),O(1)$
16
The number of possible binary trees with $4$ nodes is $12$ $13$ $14$ $15$
17
A binary search tree contains the values-$1,2,3,4,5,6,7$ and $8.$ The tree is traversed in preorder and the values are printed out. Which of the following sequences is a valid output? $5\;\;3\;\;1\;\;2\;\;4\;\;7\;\;8\;\;6\;\;$ $5\;\;3\;\;1\;\;2\;\;6\;\;4\;\;9\;\;7$ $5\;\;3\;\;2\;\;4\;\;1\;\;6\;\;7\;\;8$ $5\;\;3\;\;1\;\;2\;\;4\;\;7\;\;6\;\;8$
In a full binary tree number of nodes is $63$ then the height of the tree is : $2$ $4$ $3$ $6$
The address field of linked list : Contain address of next node May contain null character Contain address of next pointer Both $\left (A \right)$ and $\left ( B \right)$