A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

261. Postorder traversal of a given binary search tree T produces following sequence of keys:

3, 5, 7, 9, 4, 17, 16, 20, 18, 15, 14

Which one of the following sequences of keys can be the result of an in-order traversal of the tree T?
a. 3, 4, 5, 7, 9, 14, 20, 18, 17, 16, 15
b. 20, 18, 17, 16, 15, 14, 3, 4, 5, 7, 9
c. 20, 18, 17, 16, 15, 14, 9, 7, 5, 4, 3
d. 3, 4, 5, 7, 9, 14, 15, 16, 17, 18, 20
View Answer Report Discuss Too Difficult!
Answer: (d).3, 4, 5, 7, 9, 14, 15, 16, 17, 18, 20

262. The three aspects of Quantization, programmers generally concerned with are:
a. Coding error, Sampling rate and Amplification
b. Sampling rate, Coding error and Conditioning
c. Sampling rate, Aperture time and Coding error
d. Aperture time, Coding error and Strobing
View Answer Report Discuss Too Difficult!
Answer: (c).Sampling rate, Aperture time and Coding error

263. The logic of pumping lemma is an example of ....................
a. iteration
b. recursion
c. the divide and conquer principle
d. the pigeon - hole principle
View Answer Report Discuss Too Difficult!
Answer: (c).the divide and conquer principle

264. Heap allocation is required for languages that :
a. use dynamic scope rules
b. support dynamic data structures
c. support recursion
d. support recursion and dynamic data structures
View Answer Report Discuss Too Difficult!
Answer: (b).support dynamic data structures

265. Consider a full binary tree with n internal nodes, internal path length i, and external path length e. The internal path length of a full binary tree is the sum, taken over all nodes of the tree, of the depth of each node. Similarly, the external path length is the sum, taken over all leaves of the tree, of the depth of each leaf.
Which of the following is correct for the full binary tree?
a. e = i + n
b. e = i + 2n
c. e = 2i + n
d. e = 2^n + i
View Answer Report Discuss Too Difficult!
Answer: (b).e = i + 2n

266. You are given a sequence of n elements to sort. The input sequence consists of n/k subsequences, each containing k elements. The elements in a given subsequence are all smaller than the elements in the succeeding subsequence and larger than the elements in the preceding subsequence. Thus, all that is needed to sort the whole sequence of length n is to sort the k elements in each of the n/k subsequences.
The lower bound on the number of comparisons needed to solve this variant of the sorting problem is:
a. Ω(n)
b. Ω(n/k)
c. Ω(n lg k)
d. Ω(n/k lg n/k)
View Answer Report Discuss Too Difficult!
Answer: (c).Ω(n lg k)

267. Consider the recurrence relation:

T (n) = 8T(n/2) + Cn, if n > 1
= b, if n =1
Where b and c are constants.

The order of the algorithm corresponding to above recurrence relation is:
a. n
b. n^2
c. n lg n
d. n^3
View Answer Report Discuss Too Difficult!
Answer: (d).n^3

268. A data file of 1,00,000 characters contains only the characters g-l, with the frequencies as indicated in table. Using the variable-length code by Huffman codes, the file can be encoded with
a. 2,52,000 bits
b. 2,64,000 bits
c. 2,46,000 bits
d. 2,24,000 bits
View Answer Report Discuss Too Difficult!
Answer: (d).2,24,000 bits

269. The prepositional formula given by the tree is:
a. ˄˅x2˅x1¬x1¬x1
b. (x2˅¬x2)˄(x1˅x2)
c. (¬x1˅x2)˄(¬x1˅x2)
d. None of these
View Answer Report Discuss Too Difficult!
Answer: (c).(¬x1˅x2)˄(¬x1˅x2)