1
GATE CSE 2002
MCQ (Single Correct Answer)
+2
-0.6
Consider the following algorithm for searching for a given number x in an unsorted array A[1..n] having n distinct values:
1. Choose an i uniformly at random fro 1..n;
2. If A[i]=x then stop else Goto 1;
Assuming that x is present A, what is the expected number of comparisons made by the algorithm before it terminates?
A
n
B
n-1
C
2n
D
n/2
2
GATE CSE 2002
MCQ (Single Correct Answer)
+2
-0.6
The running time of the following algorithm Procedure A(n)
If n<=2 return (1) else return (A([$$\sqrt n $$])); is best described by
A
O(n)
B
O(log n)
C
O(log log n)
D
O(1)
3
GATE CSE 2002
MCQ (Single Correct Answer)
+1
-0.3
The solution to the recurrence equation
T(2k) = 3 T(2k-1) + 1, T (1) = 1, is:
A
2k
B
(3k+1 - 1)/2
C
3 log 2K
D
2 log 3K
4
GATE CSE 2002
MCQ (Single Correct Answer)
+1
-0.3
In $$2’s$$ complement addition, the overflow
A
is flagged whenever there is carry from sign bit addition
B
cannot occur when $$a$$ $$+$$ $$ve$$ value is added to $$a$$ $$-$$ $$ve$$ value
C
is flagged when the carries from sign bit and previous bit match
D
None of the above
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12