1
GATE CSE 1994
MCQ (Single Correct Answer)
+2
-0.6
The recurrence relation that arises in relation with the complexity of binary search is:
A
$$T(n) = 2T\left(\frac{n}{2}\right)+k, \text{ k is a constant }$$
B
$$T(n) = T\left(\frac{n}{2}\right)+k, \text{ k is a constant }$$
C
$$T(n) = T\left(\frac{n}{2}\right)+\log n$$
D
$$T(n) = T\left(\frac{n}{2}\right)+n$$
2
GATE CSE 1994
MCQ (Single Correct Answer)
+1
-0.3
Generation of intermediate code based on an abstract machine model is useful in compilers because
A
it makes implementation of lexical analysis and syntax analysis easier
B
syntax-directed translations can be written for intermediate code generation
C
it enhances the portability of the front end of the compiler
D
it is not possible to generate code for real machines directly from high level language programs
3
GATE CSE 1994
MCQ (Single Correct Answer)
+2
-0.6
In a compact single dimensional array representation for lower triangular matrices (i.e all the elements above the diagonal are zero) of size n $$\times$$ n, non-zero elements (i.e., elements of the lower triangle) of each row are stored one after another, starting from the first row, the index of the (i, j)th element of the lower triangular matrix in this new representation is
A
i + j
B
i + j - 1
C
$$(j - 1) + i{{(i - 1)} \over 2}$$
D
$$i + {{j(j - 1)} \over 2}$$
4
GATE CSE 1994
MCQ (Single Correct Answer)
+2
-0.6
Which of the following permutations can be obtained in the output (in the same order) using a stack assuming that the input is the sequence 1, 2, 3, 4, 5 in that order?
A
3, 4, 5, 1, 2
B
3, 4, 5, 2, 1
C
1, 5, 2, 3, 4
D
5, 4, 3, 1, 2
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12