Consider a binary search tree (BST) with $n$ leaf nodes ( $n>0$ ). Given any node $V$, the key present in the node is denoted as $\operatorname{Val}(V)$. All the keys present in the given BST are distinct. The keys belong to the set of real numbers.
For a node $V$, let $\operatorname{Suc}(V)$ denote the node that is its inorder successor. If a node $V$ does not have an inorder successor, then $\operatorname{Suc}(V)$ is NULL. As there are no duplicates, if $\operatorname{Suc}(V)$ is not NULL, then $\operatorname{Val}(V)<\operatorname{Val}(\operatorname{Suc}(V))$.
Corresponding to every leaf node $L_i$ that has a non-NULL $\operatorname{Suc}\left(L_i\right)$, a new key $k_i$ with the following property is to be inserted into the BST.
$$ \operatorname{Val}\left(L_i\right) < k_i < \operatorname{Val}\left(\operatorname{Suc}\left(L_i\right)\right) $$
Let $K$ represent the list of all such new keys to be inserted into the BST.
Which of the following statements is/are true?
Consider a stack $S$ and a queue $Q$. Both of them are initially empty and have the capacity to store ten elements each. The elements $1,2,3,4$, and 5 arrive one by one, in that order. When an element arrives, it is assigned either to $S$ (pushed on $S$ ) or to $Q$ (enqueued to $Q)$. Once all the five elements are stored, the output is generated in two steps. First, stack $S$ is emptied by popping all elements. Then queue $Q$ is emptied by dequeueing all elements. The output obtained by following this process is 43125 .
Given the output, the objective is to predict whether an element was assigned to $S$ or $Q$. Which of the following options is/are possible valid assignment(s) of the elements?
Note: In the options, the notation $x S$ denotes that element $x$ was assigned to $S$ and $y Q$ denotes that element $y$ was assigned to $Q$.
$$ \text { In the context of DBMS, consider the two sets } \mathbf{T} \text { and } \mathbf{S} \text { given below. } $$
$$ \begin{array}{ll}\,\,\,\,\, \text { T } &\,\,\,\,\, \text { S } \\ \text { I: } \text { Logical schema } & \text { L: Views } \\ \text { II: } \text { Physical schema } & \text { M: File organization and indexes } \\ \text { III: External schema } & \text { N: Relations } \end{array} $$
Which one of the following is the correct match from $T$ to $S$ ?
Consider concurrent execution of two transactions $T 1$ and $T 2$ in a DBMS, both of which access a data object $A$. For these two transactions to not conflict on $A$, which one of the following statements must be true?
GATE CSE Papers
All year-wise previous year question papers