1
GATE CSE 2008
MCQ (Single Correct Answer)
+1
-0.3
The Breadth First Search algorithm has been implemented using the queue data structure. One possible order of visiting the nodes of the following graph is GATE CSE 2008 Algorithms - Searching and Sorting Question 36 English
A
MNOPQR
B
NQMPOR
C
QMNPRO
D
QMNPOR
2
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
Consider the following C functions:
int f1(int n){
 if(n == 0 || n == 1){
    return n;
 }
 return (2 * f1(n - 1) + 3 * f1(n - 2));
}
int f2(int n){
 int i;
 int X[N], Y[N], Z[N];
 X[0] = Y[0] = Z[0] = 0;
 X[1] = 1; Y[1] = 2; Z[1] = 3;
 for(i = 2; i <= n; i++){
  X[i] = Y[i - 1] + Z[i - 2];
  Y[i] = 2 * X[i];
  Z[i] = 3 * X[i];
 }
 return X[n];
}
The returning time of f1(n) and f2(n) are
A
$$\Theta \,(n)\,and\,\Theta \,(n)$$
B
$$\Theta \,({2^n})\,and\,\Theta \,(n)$$
C
$$\Theta \,(n)\,and\,\Theta \,({2^n})$$
D
$$\Theta \,({2^n})\,and\,\Theta \,({2^n})$$
3
GATE CSE 2008
MCQ (Single Correct Answer)
+1
-0.3
The most efficient algorithm for finding the number of connected components in an undirected graph on n vertices and m edges has time complexity
A
$$\Theta (n)$$
B
$$\Theta (m)$$
C
$$\Theta (n+m)$$
D
$$\Theta (mn)$$
4
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is
A
$$\Theta \,(n)$$
B
$$\Theta \,({\log ^*}n)$$
C
$$\Theta \,({\log\,}n)$$
D
$$\Theta \,(1)$$
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12