Recent questions tagged gate-ds-ai-2024

13 13 votes
6 answers 6 answers
10.5k
10.5k views
Consider sorting the following array of integers in ascending order using an inplace Quicksort algorithm that uses the last element as the pivot.\begin{array}{|l|l|l|l|l|...
9 9 votes
4 4 answers
5.5k
5.5k views
The fundamental operations in a double-ended queue $D$ are: insertFirst (e) - Insert a new element $e$ at the beginning of $D$. insertLast (e) - Insert a new element $e$ ...
5 5 votes
2 2 answers
4.3k
4.3k views
Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be the function $f(x)=\frac{1}{1+e^{-x}}$.The value of the derivative of $f$ at $x$ where $f(x)=0.4$ is $\_\_\_\_\_\_\_$. (roun...
2 2 votes
3 3 answers
4.6k
4.6k views
The sample average of $50$ data points is $40$. The updated sample average after including a new data point taking the value of $142$ is $\_\_\_\_\_\_\_\_$.
38 38 votes
11 answers 11 answers
11.5k
11.5k views
Consider the $3 \times 3$ matrix $\boldsymbol{M}=\left[\begin{array}{lll}1 & 2 & 3 \\ 3 & 1 & 3 \\ 4 & 3 & 6\end{array}\right]$.The determinant of $\left(\boldsymbol{M}^{...
28 28 votes
8 answers 8 answers
13.4k
13.4k views
​​​​​A fair six-sided die (with faces numbered $1,2,3,4,5,6$ ) is repeatedly thrown independently.What is the expected number of times the die is thrown until two consecu...
13 13 votes
2 2 answers
4.4k
4.4k views
​​​​​Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a function. Note: $\mathbb{R}$ denotes the set of real numbers.\[f(x)=\left\{\begin{array}{cl}-x, & \text { if } x&lt-2...
8 8 votes
2 2 answers
5.9k
5.9k views
​​​​Consider the following Python code:def count(child_dict, i): if i not in child_dict.keys(): return 1 ans = 1 for j in child_dict[i]: ans += count(child_dict, j) retur...
4 4 votes
2 2 answers
3.9k
3.9k views
​​​​​Consider the function computes $(X)$ whose pseudocode is given below:computes $(X)$$S \leftarrow 1$for $i \leftarrow 2$ to length $(X)$$S[i] \leftarrow 1$if $X[i-1]...
23 23 votes
4 4 answers
9.1k
9.1k views
​​​​​Let $F(n)$ denote the maximum number of comparisons made while searching for an entry in a sorted array of size $n$ using binary search.Which ONE of the following op...
6 6 votes
4 4 answers
5.8k
5.8k views
​​​​​Consider the following Python function:def fun(D, s1, s2): if s1 < s2: D[s1], D[s2] = D[s2], D[s1] fun(D, s1+1, s2-1)What does this Python function fun ( ) do? Selec...
3 3 votes
3 3 answers
4.6k
4.6k views
Consider the table below, where the $(i, j)^{t h}$ element of the table is the distance between points $x_{i}$ and $x_{j}$. Single linkage clustering is performed on data...
4 4 votes
2 2 answers
5.5k
5.5k views
​​​​​​Consider the two neural networks (NNs) shown in Figures $1$ and $2$, with $R e L U$ activation $(\text{ReLU}(z)=\max \{0, z\}, \forall z \in \text{R})$. The connect...
18 18 votes
8 8 answers
6.8k
6.8k views
​​​​​Consider a state space where the start state is number $1$. The successor function for the state numbered $n$ returns two states numbered $n+1$ and $n+2$. Assume tha...
13 13 votes
4 4 answers
7.3k
7.3k views
Consider the following sorting algorithms:Bubble sortInsertion sortSelection sortWhich ONE among the following choices of sorting algorithms sorts the numbers in the arra...
21 21 votes
3 3 answers
6.0k
6.0k views
​​​​​​Given the relational schema $R=(U, V, W, X, Y, Z)$ and the set of functional dependencies:\[\{U \rightarrow V, U \rightarrow W, W X \rightarrow Y, W X \rightarrow Z...
8 8 votes
5 5 answers
7.1k
7.1k views
Select all choices that are subspaces of $\mathbb{R}^{3}$.Note: $\mathbb{R}$ denotes the set of real numbers.$\left\{\mathbf{x}=\left[\begin{array}{l}x_{1} \\ x_{2} \\ x_...
12 12 votes
3 3 answers
4.7k
4.7k views
​​​​​​Which of the following statements is/are TRUE?Note: $\mathbb{R}$ denotes the set of real numbers.There exist $\text{M} \in \mathbb{R}^{3 \times 3}, \text{p} \in \ma...
6 6 votes
2 2 answers
4.4k
4.4k views
​​​​​Let $\mathbb{R}$ be the set of real numbers, $U$ be a subspace of $\mathbb{R}^{3}$ and $\text{M} \in \mathbb{R}^{3 \times 3}$ be the matrix corresponding to the proj...
6 6 votes
3 3 answers
2.6k
2.6k views
​​​​​Consider the function $f: \mathbb{R} \rightarrow \mathbb{R}$ where $\mathbb{R}$ is the set of all real numbers.\[f(x)=\frac{x^{4}}{4}-\frac{2 x^{3}}{3}-\frac{3 x^{2}...
11 11 votes
5 5 answers
5.0k
5.0k views
​​​​​​Consider the directed acyclic graph (DAG) below:Which of the following is/are valid vertex orderings that can be obtained from a topological sort of the DAG?$\text{...
19 19 votes
3 3 answers
7.9k
7.9k views
​​​​​Let $H, I, L$, and $N$ represent height, number of internal nodes, number of leaf nodes, and the total number of nodes respectively in a rooted binary tree.Which of ...
3 3 votes
3 3 answers
3.1k
3.1k views
Consider the following figures representing datasets consisting of two-dimensional features with two classes denoted by circles and squares. Which of the following is/are...
7 7 votes
3 3 answers
5.0k
5.0k views
​​​​​Let game(ball, rugby) be true if the ball is used in rugby and false otherwise.Let shape(ball, round) be true if the ball is round and false otherwise.Consider the f...
20 20 votes
5 answers 5 answers
6.6k
6.6k views
​​​​​​An OTT company is maintaining a large disk-based relational database of different movies with the following schema:\[\begin{array}{l}\text { Movie (ID, CustomerRati...
19 19 votes
5 5 answers
8.9k
8.9k views
Let $X$ be a random variable uniformly distributed in the interval $[1,3]$ and $Y$ be a random variable uniformly distributed in the interval $[2, 4]$. If $X$ and $Y$ are...
12 12 votes
3 answers 3 answers
5.6k
5.6k views
Let $X$ be a random variable exponentially distributed with parameter $\lambda>0$. The probability density function of $X$ is given by:\[f_{X}(x)=\left\{\begin{array}{ll}...
7 7 votes
6 answers 6 answers
6.4k
6.4k views
Consider two events $T$ and $S$. Let $\bar{T}$ denote the complement of the event $T$. The probability associated with different events are given as follows:\[P(\bar{T})=...
8 8 votes
2 2 answers
6.3k
6.3k views
Consider a joint probability density function of two random variables $X$ and $Y$\[f_{X, Y}(x, y)=\left\{\begin{array}{rll}2 x y, & 0<x<2, & 0<y<x \\ 0, & \text { otherwi...
7 7 votes
2 2 answers
5.0k
5.0k views
Given the two-dimensional dataset consisting of $5$ data points from two classes (circles and squares) and assume that the Euclidean distance is used to measure the dista...