31.
The asymptotic upper bound solution of the recurrence
relation given by

T(n)= 2T(n/2)+n/log
n is:

(1) O(n

^{2})
(2) O(n log
n)

(3) O(n log
log n)

(4) O(log log
n)

Answer: 3

32. Any
decision tree that sorts n elements has height ..............

(1) Î©(log n)

(2) Î©(n)

(3) Î©(n log
n)

(4) Î©(n

^{2})
Answer: 3

33. Red-black
trees are one of many Search tree schemes that are "balanced” in order to
guarantee that basic dynamic-set operations take ............. time in the
worst case.

(1) O(1)

(2) O(log n)

(3) O(n)

(4) O(n log
n)

Answer: 2

34. The
minimum number of scalar multiplication required, for parenthesization of a
matrix-chain product whose sequence of dimensions for four matrices is <5,10,3,12,5>
is

(1) 630

(2) 580

(3) 480

(4) 405

Answer: 4

35. Dijkstra’s
algorithm is based on

(1) Divide
and conquer paradigm

(2) Dynamic
Programming

(3) Greedy
Approach

(4)
Backtracking paradigm

Answer: 3

36. Match
the following with respect to algorithm paradigms:

**List-I List-II**

a. Merge
sort i. Dynamic
Programming

b. Huffman
coding ii. Greedy approach

c. Optimal
polygon triangulation iii. Divide and conquer

d. Subset
sum problem iv. Back tracking

**Codes:**

a
b c d

(1) iii i ii iv

(2) ii i iv
iii

(3) ii i
iii iv

(4) iii ii
i iv

Answer: 4

37. Abstraction
and encapsulation are fundamental principles that underlie the object oriented approach
to software development. What can you say about the following two statements?

I.
Abstraction allows us to focus on what something does without considering the complexities
of how it works.

II.
Encapsulation allows us to consider complex ideas while ignoring irrelevant
detail that would confuse us.

(1) Neither
I nor II is correct.

(2) Both I
and II are correct.

(3) Only II
is correct.

(4) Only I
is correct.

Answer: 1

38. Given
the array of integers ‘array’ shown below:

What is the
output of the following JAVA statements?

int [ ] p =
new int [10];

int [ ] q =
new int [10];

for (int k =
0; k < 10; k ++)

p[k]
= array [k];

q = p;

p[4] = 20;

System.out.println(array
[4] + “:” + q[4]);

(1) 20:20

(2) 18:18

(3) 18:20

(4) 20:18

Answer: 3

39. Consider
the following JAVA program:

public class
First {

public
static int CBSE (int x) {

if (x < 100) x = CBSE (x +10);

return
(x - 1);

}

public
static void main (String[] args){

System.out.print(First.CBSE(60));

}

}

What does
this program print?

(1) 59

(2) 95

(3) 69

(4) 99

Answer: 2

40. Which
of the following statement(s) with regard to an abstract class in JAVA is/are
TRUE?

I. An
abstract class is one that is not used to create objects.

II. An abstract
class is designed only to act as a base class to be inherited by other classes.

(1) Only l

(2) Only II

(3) Neither I
nor II

(4) Both l and
II

Answer: 4

## 1 Comments

sir 39 th question answer is 99 only

ReplyDelete