6 answers
5
1 answer
8
T(n)=4T(n/2)+n/lognthis can be solved by master theorem but whyt(n)=2t(n/2)+n/logn can't be solved by master theorem ?
4 answers
11
The intersection of a context free language and a regular language a)need not be regularb)need not be context freec) is always regulard) is always context free
3 answers
13
Let $A$ be an $n \times n$ matrix of the following form.$$A = \begin{bmatrix}3&1&0&0&0&\ldots&0&0&0\\1&3&1&0&0&\ldots&0&0&0\\0&1&3&1&0&\ldots&0&0&0\\0&0&1&3&1&\ldots&0&0&...
8 answers
14
8 answers
15
The product of the non-zero eigenvalues of the matrix is ____$\begin{pmatrix} 1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 1 & 1 & 0 \\ 0 & 1 & 1 & 1 & 0 \\ 0 & 1 & 1 & 1 & 0 \\ 1 & 0 & ...
2 answers
18
0 answers
19
What will be output of the program?int d=0; int f(int a,int b){ int c; d++; if(b==3) return a*a*a; else{ c=f(a,b/3); return(c*c*c); } } int main(){ printf("%d",f(4,81)); ...
1 answer
20
Conversion of binary search tree into a Max heap takes:O(n) timeO(nlog n) timeNone
3 answers
21
for(int i=0; i<=100;i++) { if (i % 3 == 0) printf("Great); if(i%5 == 0) printf("India"); }Count the number of times GreatIndia is printed.62033none of these
0 answers
22
void find(int x){ static int i=10,y=0; y=y+i; for(i;i>0;i=i-10){ if(x!=0) find(x-1); else{ printf("%d",y); } } }What will be output printed for find(4)?
1 answer
23
void print(int i){ static int x=4; if(i!=0){ print( x); } printf("%d",x); }What will be output printed for print(10)?Will it print value as call by value or call by refer...
4 answers
26
Which of the following gives O(1) complexity if we want to check whether an edge exists between two given nodes in a graph?Adjacency ListAdjacency MatrixIncidence MatrixN...
2 answers
27