1
GATE CSE 2002
MCQ (Single Correct Answer)
+1
-0.3
In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is
A
log n
B
n/2
C
Log2 n - 1
D
n
2
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
3
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)
4
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
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