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 Anju Mehral
4
answers
1
GATE CSE 2020 | Question: 48
Consider the following C functions. int tob (int b, int* arr) { int i; for (i = 0; b>0; i++) { if (b%2) arr [i] = 1; else arr[i] = 0; b = b/2; } return (i); } int pp(int a, int b) { int arr[20]; int i, tot = 1, ex, len; ex = a; len = tob(b ... ; i<len ; i++) { if (arr[i] ==1) tot = tot * ex; ex= ex*ex; } return (tot) ; } The value returned by $pp(3,4)$ is _______.
Consider the following C functions.int tob (int b, int* arr) { int i; for (i = 0; b>0; i++) { if (b%2) arr [i] = 1; else arr[i] = 0; b = b/2; } ret...
11.5k
views
commented
Mar 21, 2021
Algorithms
gatecse-2020
numerical-answers
identify-function
2-marks
+
–
8
answers
2
GATE CSE 2005 | Question: 50
Let $G(x) = \frac{1}{(1-x)^2} = \sum\limits_{i=0}^\infty g(i)x^i$, where $|x| < 1$. What is $g(i)$? $i$ $i+1$ $2i$ $2^i$
Let $G(x) = \frac{1}{(1-x)^2} = \sum\limits_{i=0}^\infty g(i)x^i$, where $|x| < 1$. What is $g(i)$?$i$$i+1$$2i$$2^i$
8.4k
views
commented
Jan 20, 2020
Combinatory
gatecse-2005
normal
generating-functions
+
–
9
answers
3
GATE CSE 2004 | Question: 75
Mala has the colouring book in which each English letter is drawn two times. She wants to paint each of these $52$ prints with one of $k$ colours, such that the colour pairs used to colour any two letters are different. Both prints of a letter can also be coloured with the same colour. What is the minimum value of $k$ that satisfies this requirement? $9$ $8$ $7$ $6$
Mala has the colouring book in which each English letter is drawn two times. She wants to paint each of these $52$ prints with one of $k$ colours, such that the colour pa...
16.9k
views
commented
Jan 20, 2020
Combinatory
gatecse-2004
combinatory
+
–
4
answers
4
GATE IT 2005 | Question: 58
Let $a$ be an array containing $n$ integers in increasing order. The following algorithm determines whether there are two distinct numbers in the array whose difference is a specified number $S > 0$. i = 0; j = 1; while (j < n ){ if (E) j++; else if (a[j] - a[i] == S) break; else i+ ... $a[j] - a[i] < S$ $a[i] - a[j] < S$ $a[i] - a[j] > S$
Let $a$ be an array containing $n$ integers in increasing order. The following algorithm determines whether there are two distinct numbers in the array whose difference i...
9.9k
views
commented
Jan 9, 2020
Programming in C
gateit-2005
programming
normal
programming-in-c
+
–
12
answers
5
GATE IT 2005 | Question: 14
In a depth-first traversal of a graph $G$ with $n$ vertices, $k$ edges are marked as tree edges. The number of connected components in $G$ is $k$ $k+1$ $n-k-1$ $n-k$
In a depth-first traversal of a graph $G$ with $n$ vertices, $k$ edges are marked as tree edges. The number of connected components in $G$ is$k$$k+1$$n-k-1$$n-k$
18.1k
views
commented
Jan 8, 2020
Algorithms
gateit-2005
algorithms
graph-algorithms
normal
graph-search
+
–
2
answers
6
GATE CSE 2013 | Question: 6
Which one of the following is the tightest upper bound that represents the number of swaps required to sort $n$ numbers using selection sort? $O(\log n$) $O(n$) $O(n \log n$) $O(n^{2}$)
Which one of the following is the tightest upper bound that represents the number of swaps required to sort $n$ numbers using selection sort?$O(\log n$)$O(n$)$O(n \log n$...
10.2k
views
comment reshown
Jan 5, 2020
Algorithms
gatecse-2013
algorithms
sorting
easy
selection-sort
+
–
6
answers
7
GATE CSE 2006 | Question: 72
The $2^n$ vertices of a graph $G$ corresponds to all subsets of a set of size $n$, for $n \geq 6$. Two vertices of $G$ are adjacent if and only if the corresponding sets intersect in exactly two elements. The maximum degree of a vertex in $G$ is: $\binom{\frac{n}{2}}{2}.2^{\frac{n}{2}}$ $2^{n-2}$ $2^{n-3}\times 3$ $2^{n-1}$
The $2^n$ vertices of a graph $G$ corresponds to all subsets of a set of size $n$, for $n \geq 6$. Two vertices of $G$ are adjacent if and only if the corresponding sets...
18.0k
views
commented
Dec 11, 2019
Graph Theory
gatecse-2006
graph-theory
normal
degree-of-graph
+
–
3
answers
8
GATE CSE 2006 | Question: 55
Consider these two functions and two statements S1 and S2 about them. int work1(int *a, int i, int j) { int x = a[i+2]; a[j] = x+1; return a[i+2] - 3; } int work2(int *a, int i, int j) { int t1 = i+2; int t2 = a[t1]; a[j] = ... CPU time) of work2 compared to work1 S1 is false and S2 is false S1 is false and S2 is true S1 is true and S2 is false S1 is true and S2 is true
Consider these two functions and two statements S1 and S2 about them. int work1(int *a, int i, int j) { int x = a[i+2]; a[j] = x+1; return a[i+2] - 3; }int work2(int *a, ...
10.6k
views
commented
Nov 9, 2019
Compiler Design
gatecse-2006
compiler-design
normal
code-optimization
+
–
3
answers
9
GATE IT 2006 | Question: 52
The following function computes the value of $\binom{m}{n}$ correctly for all legal values $m$ and $n$ ($m ≥1, n ≥ 0$ and $m > n$) int func(int m, int n) { if (E) return 1; else return(func(m -1, n) + func(m - 1, n - 1)); } In the above function, which of the following is the ... $(m = = 1)$ $(n = = 0) || (m = = n)$ $(n = = 0)$ && $(m = = n)$
The following function computes the value of $\binom{m}{n}$ correctly for all legal values $m$ and $n$ ($m ≥1, n ≥ 0$ and $m n$)int func(int m, int n) { if (E) retu...
8.3k
views
commented
Nov 9, 2019
Algorithms
gateit-2006
algorithms
identify-function
normal
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register