Question 11
Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n(≥ 2) numbers? In the recurrence equations given in the options below, c is a constant.
Question 12
1. L1\' (complement of L1) is recursive 2. L2\' (complement of L2) is recursive 3. L1\' is context-free 4. L1\' ∪ L2 is recursively enumerable
Question 15
Match the following
List-I A. Prim’s algorithm for minimum spanning tree B. Floyd-Warshall algorithm for all pairs shortest paths C. Mergesort D. Hamiltonian circuit List-II 1. Backtracking 2. Greedy method 3. Dynamic programming 4. Divide and conquer Codes: A B C D (a) 3 2 4 1 (b) 1 2 4 3 (c) 2 3 4 1 (d) 2 1 3 4
Question 16
S1: A memory operand S2: A processor register S3: An implied accumulator register
Question 17
P1() { C = B – 1; B = 2*C; } P2() { D = 2 * B; B = D - 1; }The number of distinct values that B can possibly take after the execution is
Question 18
1. 3, 5, 7, 8, 15, 19, 25 2. 5, 8, 9, 12, 10, 15, 25 3. 2, 7, 10, 8, 14, 16, 20 4. 4, 6, 7, 9, 18, 20, 25
Question 19
void f1 (int a, int b)
{
int c;
c=a; a=b; b=c;
}
void f2 (int *a, int *b)
{
int c;
c=*a; *a=*b;*b=c;
}
int main()
{
int a=4, b=5, c=6;
f1(a, b);
f2(&b, &c);
printf (“%d”, c-a-b);
return 0;
}
Question 20
There are 65 questions to complete.