Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by Hareesh22
1
answer
1
GO Classes 2023 | Weekly Quiz 5 | Question: 7
Consider the following arguments. $\text{Argument 1:}$ Kerry errs or Myrna fails to show. If Kerry errs, then he does not break the record. Myrna fails to show. Therefore, Kerry does break the record. $\text{Argument 2:}$ If Tasha leaves, ... is true? Only Argument $1$ is valid. Only Argument $2$ is valid. Both Arguments are valid. No Argument is valid.
Consider the following arguments.$\text{Argument 1:}$ Kerry errs or Myrna fails to show. If Kerry errs, then he does not break the record. Myrna fails to show. Therefore,...
391
views
answered
Jun 22, 2022
Mathematical Logic
goclasses_wq5
goclasses
mathematical-logic
propositional-logic
1-mark
+
–
2
answers
2
GO Classes 2023 | Weekly Quiz 3 | Question: 13
Consider the following proposition : $A_n=\underbrace{(p\rightarrow (q\rightarrow (p\rightarrow (q\rightarrow (\dots )))))}_{\text{number of p's+ number of q's = n}}$ Which of the following is true for $A_n$ : For every $n \geq 2$, ... $n \geq 2$, $A_n$ is a contingency. For every $n \geq 2$, $A_n$ is either a tautology or a contingency.
Consider the following proposition :$A_n=\underbrace{(p\rightarrow (q\rightarrow (p\rightarrow (q\rightarrow (\dots )))))}_{\text{number of p's+ number of q's = n}}$Which...
631
views
commented
Jun 21, 2022
Mathematical Logic
goclasses
goclasses_wq3
mathematical-logic
propositional-logic
1-mark
+
–
1
answer
3
GO Classes Weekly Quiz 2 | Programming in C | Propositional Logic | Question: 9
In $C$ programming, constant integers are considered to be signed integers by default. One way to represent them as an unsigned constant is by appending $U$ as a suffix. For example, $-1$ is signed whereas $-1U$ is unsigned. Which of the following ... $\text{TRUE}$? $-1 > -2$ $-1U > -2$ $-1 > 0U$ $-1 > 0$
In $C$ programming, constant integers are considered to be signed integers by default. One way to represent them as an unsigned constant is by appending $U$ as a suffix. ...
800
views
comment edited
Jun 20, 2022
Programming in C
goclasses_wq2
goclasses
programming
programming-in-c
number-representation
multiple-selects
2-marks
+
–
2
answers
4
GATE CSE 1997 | Question: 1.6
In the following grammar $X ::= X \oplus Y \mid Y$ $Y::= Z * Y \mid Z$ $Z::= id $ Which of the following is true? $\text{ }\oplus\text{'}$ is left associative while $\text{ }*\text{'}$ ... $\text{ }\oplus\text{'}$ is right associative while $\text{ }*\text{'}$ is left associative None of the above
In the following grammar$X ::= X \oplus Y \mid Y$$Y::= Z * Y \mid Z$$Z::= id $Which of the following is true?$\text{‘}\oplus\text{’}$ is left associative while $\text...
6.7k
views
commented
Nov 12, 2021
Compiler Design
gate1997
compiler-design
grammar
normal
+
–
6
answers
5
GATE CSE 2014 Set 2 | Question: 36
Let $L_1=\{w\in\{0,1\}^*\mid w$ $\text{ has at least as many occurrences of }$ $(110)'\text{s as }$ $(011)'\text{s} \}$. Let $L_2=\{w \in\{0,1\}^*\ \mid w$ $ \text{ has at least as many occurrences of }$ ... is TRUE? $L_1$ is regular but not $L_2$ $L_2$ is regular but not $L_1$ Both $L_1$ and $L_2$ are regular Neither $L_1$ nor $L_2$ are regular
Let $L_1=\{w\in\{0,1\}^*\mid w$ $\text{ has at least as many occurrences of }$ $(110)'\text{s as }$ $(011)'\text{s} \}$. Let $L_2=\{w \in\{0,1\}^*\ \mid w$ $ \text{ has a...
25.2k
views
commented
Nov 5, 2021
Theory of Computation
gatecse-2014-set2
theory-of-computation
normal
regular-language
+
–
4
answers
6
GATE CSE 2014 Set 3 | Question: 37
Suppose you want to move from $0$ to $100$ on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified pair of integers $i,\:j \:\text{with}\: i <j$. Given a shortcut $(i,j)$, if you ... $y$ and $z$ be such that $T(9) = 1 + \min(T(y),T(z))$. Then the value of the product $yz$ is _____.
Suppose you want to move from $0$ to $100$ on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-s...
10.1k
views
commented
Oct 27, 2021
Algorithms
gatecse-2014-set3
algorithms
normal
numerical-answers
dynamic-programming
+
–
5
answers
7
GATE CSE 2003 | Question: 67
Let $G =(V,E)$ be an undirected graph with a subgraph $G_1 = (V_1, E_1)$. Weights are assigned to edges of $G$ as follows. $w(e) = \begin{cases} 0 \text{, if } e \in E_1 \\1 \text{, otherwise} \end{cases}$ A single-source shortest path ... edges in the shortest paths from $v_1$ to all vertices of $G$ $G_1$ is connected $V_1$ forms a clique in $G$ $G_1$ is a tree
Let $G =(V,E)$ be an undirected graph with a subgraph $G_1 = (V_1, E_1)$. Weights are assigned to edges of $G$ as follows.$$w(e) = \begin{cases} 0 \text{, if } e \in E_...
20.1k
views
commented
Oct 24, 2021
Algorithms
gatecse-2003
algorithms
graph-algorithms
normal
+
–
2
answers
8
Sorting(Algorithms)
The complexity of comparison based sorting algorithm is (nlogn) .How?
The complexity of comparison based sorting algorithm is (nlogn) .How?
664
views
answered
Oct 10, 2021
Algorithms
algorithms
time-complexity
sorting
+
–
5
answers
9
GATE CSE 2014 Set 1 | Question: 41
Consider the following C function in which size is the number of elements in the array E: int MyX(int *E, unsigned int size) { int Y = 0; int Z; int i, j, k; for(i = 0; i< size; i++) Y = Y + E[i]; for(i=0; i < size; ... in any sub-array of array E. sum of the maximum elements in all possible sub-arrays of array E. the sum of all the elements in the array E.
Consider the following C function in which size is the number of elements in the array E: int MyX(int *E, unsigned int size) { int Y = 0; int Z; int i, j, k; for(i = 0; i...
12.6k
views
commented
Oct 10, 2021
Algorithms
gatecse-2014-set1
algorithms
identify-function
normal
+
–
10
answers
10
GATE CSE 2008 | Question: 78
Let $x_n$ denote the number of binary strings of length $n$ that contain no consecutive $0$s. Which of the following recurrences does $x_n$ satisfy? $x_n = 2x_{n-1}$ $x_n = x_{\lfloor n/2 \rfloor} + 1$ $x_n = x_{\lfloor n/2 \rfloor} + n$ $x_n = x_{n-1} + x_{n-2}$
Let $x_n$ denote the number of binary strings of length $n$ that contain no consecutive $0$s.Which of the following recurrences does $x_n$ satisfy?$x_n = 2x_{n-1}$$x_n = ...
8.5k
views
commented
Oct 7, 2021
Algorithms
gatecse-2008
algorithms
recurrence-relation
normal
+
–
8
answers
11
GATE CSE 2019 | Question: 37
There are $n$ unsorted arrays: $A_1, A_2, \dots, A_n$. Assume that $n$ is odd.Each of $A_1, A_2, \dots, A_n$ contains $n$ distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of $A_1, A_2, \dots , A_n$ is $O(n)$ $O(n \: \log \: n)$ $O(n^2)$ $\Omega (n^2 \log n)$
There are $n$ unsorted arrays: $A_1, A_2, \dots, A_n$. Assume that $n$ is odd.Each of $A_1, A_2, \dots, A_n$ contains $n$ distinct elements. There are no common elements ...
35.2k
views
commented
Oct 5, 2021
Algorithms
gatecse-2019
algorithms
time-complexity
2-marks
+
–
6
answers
12
GATE IT 2005 | Question: 53
The following$ C$ function takes two ASCII strings and determines whether one is an anagram of the other. An anagram of a string s is a string obtained by permuting the letters in s. int anagram (char *a, char *b) { int count [128], j; for (j = 0; j < 128; j++) count[j] = 0; j ... [j]]++ A: count [a[j++]]++ and B: count[b[j]]-- A: count [a[j]]++ and B: count[b[j++]]--
The following$ C$ function takes two ASCII strings and determines whether one is an anagram of the other. An anagram of a string s is a string obtained by permuting the l...
12.2k
views
commented
Dec 1, 2020
Algorithms
gateit-2005
normal
identify-function
+
–
4
answers
13
GATE CSE 1996 | Question: 2.4
Which one of the following is false? The set of all bijective functions on a finite set forms a group under function composition The set $\{1, 2, \dots p-1\}$ forms a group under multiplication mod $p$, where $p$ is a prime number The set of all strings over a finite ... $\langle G, * \rangle$ if and only if for any pair of elements $a, b \in S, a * b^{-1} \in S$
Which one of the following is false?The set of all bijective functions on a finite set forms a group under function compositionThe set $\{1, 2, \dots p-1\}$ forms a group...
9.6k
views
commented
Oct 23, 2020
Set Theory & Algebra
gate1996
set-theory&algebra
normal
set-theory
group-theory
+
–
5
answers
14
GATE CSE 1996 | Question: 1.3
Suppose $X$ and $Y$ are sets and $|X| \text{ and } |Y|$ are their respective cardinality. It is given that there are exactly $97$ functions from $X$ to $Y$. From this one can conclude that $|X| =1, |Y| =97$ $|X| =97, |Y| =1$ $|X| =97, |Y| =97$ None of the above
Suppose $X$ and $Y$ are sets and $|X| \text{ and } |Y|$ are their respective cardinality. It is given that there are exactly $97$ functions from $X$ to $Y$. From this one...
8.7k
views
commented
Oct 9, 2020
Set Theory & Algebra
gate1996
set-theory&algebra
functions
normal
+
–
8
answers
15
GATE IT 2006 | Question: 47
Consider the depth-first-search of an undirected graph with $3$ vertices $P$, $Q$, and $R$. Let discovery time $d(u)$ represent the time instant when the vertex $u$ is first visited, and finish time $f(u)$ represent the time instant when the ... are two connected components, and $Q$ and $R$ are connected There are two connected components, and $P$ and $Q$ are connected
Consider the depth-first-search of an undirected graph with $3$ vertices $P$, $Q$, and $R$. Let discovery time $d(u)$ represent the time instant when the vertex $u$ is fi...
11.2k
views
commented
Sep 28, 2020
Algorithms
gateit-2006
algorithms
graph-algorithms
normal
graph-search
depth-first-search
+
–
4
answers
16
TIFR CSE 2011 | Part B | Question: 31
Given a set of $n=2^{k}$ distinct numbers, we would like to determine the smallest and the second smallest using comparisons. Which of the following statements is TRUE? Both these elements can be determined using $2k$ comparisons. ... $nk$ comparisons are necessary to determine these two elements.
Given a set of $n=2^{k}$ distinct numbers, we would like to determine the smallest and the second smallest using comparisons. Which of the following statements is TRUE?Bo...
7.7k
views
commented
Sep 15, 2020
Algorithms
tifr2011
algorithms
sorting
+
–
2
answers
17
TIFR CSE 2011 | Part B | Question: 21
Let $S=\left \{ x_{1},....,x_{n} \right \}$ be a set of $n$ numbers. Consider the problem of storing the elements of $S$ in an array $A\left [ 1...n \right ]$ ... time. This problem can be solved in $O \left ( n^{2} \right )$ time but not in $O(n\log n)$ time. None of the above.
Let $S=\left \{ x_{1},....,x_{n} \right \}$ be a set of $n$ numbers. Consider the problem of storing the elements of $S$ in an array $A\left [ 1...n \right ]$ such that t...
2.1k
views
commented
Sep 14, 2020
Algorithms
tifr2011
algorithms
sorting
+
–
5
answers
18
GATE IT 2005 | Question: 59
Let $a$ and $b$ be two sorted arrays containing $n$ integers each, in non-decreasing order. Let $c$ be a sorted array containing $2n$ integers obtained by merging the two arrays $a$ and $b$. Assuming the arrays are indexed starting from $0$, consider the following ... Which of the following is TRUE? only I and II only I and IV only II and III only III and IV
Let $a$ and $b$ be two sorted arrays containing $n$ integers each, in non-decreasing order. Let $c$ be a sorted array containing $2n$ integers obtained by merging the two...
11.8k
views
commented
Sep 13, 2020
Algorithms
gateit-2005
algorithms
sorting
normal
+
–
12
answers
19
GATE CSE 2003 | Question: 61
In a permutation \(a_1 ... a_n\), of n distinct integers, an inversion is a pair \((a_i, a_j)\) such that \(i < j\) and \(a_i > a_j\). If all permutations are equally likely, what is the expected number of inversions in a randomly chosen permutation of \(1. . . n\)? \(\frac{n(n-1)}{2}\) \(\frac{n(n-1)}{4}\) \(\frac{n(n+1)}{4}\) \(2n[\log_2n]\)
In a permutation \(a_1 ... a_n\), of n distinct integers, an inversion is a pair \((a_i, a_j)\) such that \(i < j\) and \(a_i a_j\).If all permutations are equally likel...
22.0k
views
commented
Sep 13, 2020
Algorithms
gatecse-2003
algorithms
sorting
inversion
normal
+
–
5
answers
20
GATE CSE 1999 | Question: 1.16
If $n$ is a power of $2$, then the minimum number of multiplications needed to compute $a^n$ is $\log_2 n$ $\sqrt n$ $n-1$ $n$
If $n$ is a power of $2$, then the minimum number of multiplications needed to compute $a^n$ is$\log_2 n$$\sqrt n$$n-1$$n$
9.2k
views
commented
Sep 9, 2020
Algorithms
gate1999
algorithms
time-complexity
normal
+
–
5
answers
21
GATE CSE 1997 | Question: 15
Consider the following function. Function F(n, m:integer):integer; begin if (n<=0) or (m<=0) then F:=1 else F:F(n-1, m) + F(n, m-1); end; Use the recurrence relation ... value of $F(n, m)$? How many recursive calls are made to the function $F$, including the original call, when evaluating $F(n, m)$.
Consider the following function.Function F(n, m:integer):integer; begin if (n<=0) or (m<=0) then F:=1 else F:F(n-1, m) + F(n, m-1); end;Use the recurrence relation $\beg...
4.6k
views
commented
Sep 8, 2020
Algorithms
gate1997
algorithms
recurrence-relation
descriptive
+
–
9
answers
22
GATE CSE 2014 Set 1 | Question: 37
There are $5$ bags labeled $1$ to $5$. All the coins in a given bag have the same weight. Some bags have coins of weight $10$ gm, others have coins of weight $11$ gm. I pick $1, 2, 4, 8, 16$ coins respectively from bags $1$ to $5$ Their total weight comes out to $323$ gm. Then the product of the labels of the bags having $11$ gm coins is ___.
There are $5$ bags labeled $1$ to $5$. All the coins in a given bag have the same weight. Some bags have coins of weight $10$ gm, others have coins of weight $11$ gm. I p...
9.5k
views
answered
Aug 19, 2020
Algorithms
gatecse-2014-set1
algorithms
numerical-answers
normal
algorithm-design
+
–
3
answers
23
GATE CSE 1999 | Question: 12
In binary tree, a full node is defined to be a node with $2$ children. Use induction on the height of the binary tree to prove that the number of full nodes plus one is equal to the number of leaves. Draw the min-heap that results from insertion of the following ... empty min-heap: $7, 6, 5, 4, 3, 2, 1$. Show the result after the deletion of the root of this heap.
In binary tree, a full node is defined to be a node with $2$ children. Use induction on the height of the binary tree to prove that the number of full nodes plus one is e...
4.5k
views
commented
Aug 11, 2020
DS
gate1999
data-structures
binary-heap
normal
descriptive
+
–
8
answers
24
GATE CSE 2014 Set 3 | Question: 39
Suppose we have a balanced binary search tree $T$ holding $n$ numbers. We are given two numbers $L$ and $H$ and wish to sum up all the numbers in $T$ that lie between $L$ and $H$. Suppose there are $m$ such numbers in $T$. If the tightest upper bound on the time to compute the sum is $O(n^a\log^bn+m^c\log^dn)$, the value of $a+10b+100c+1000d$ is ______.
Suppose we have a balanced binary search tree $T$ holding $n$ numbers. We are given two numbers $L$ and $H$ and wish to sum up all the numbers in $T$ that lie between $L$...
31.5k
views
commented
Aug 10, 2020
DS
gatecse-2014-set3
data-structures
binary-search-tree
numerical-answers
normal
+
–
6
answers
25
GATE IT 2006 | Question: 51
Which one of the choices given below would be printed when the following program is executed? #include <stdio.h> int a1[] = {6, 7, 8, 18, 34, 67}; int a2[] = {23, 56, 28, 29}; int a3[] = {-12, 27, -31}; int *x[] = {a1, a2, a3}; void print(int *a[]) { printf("%d," ... (x); } $8, -12, 7, 23, 8$ $8, 8, 7, 23, 7$ $-12, -12, 27, -31, 23$ $-12, -12, 27, -31, 56$
Which one of the choices given below would be printed when the following program is executed? #include <stdio.h int a1[] = {6, 7, 8, 18, 34, 67}; int a2[] = {23, 5...
12.9k
views
commented
Jul 21, 2020
Programming in C
gateit-2006
programming
programming-in-c
normal
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register