Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the cardinality of the set of integers X defined below?X = {n | 1 ≤ n ≤ 123, n is not divisible by either 2, 3 or 5}(A) 28(B) 33(C) 37(D) 44

Answer» Answer: (B)
Explanation:

anil_4

2.

Which of the following statement(s) is TRUE?A hash function takes a message of arbitrary length and generates a fixed length code.A hash function takes a message of fixed length and generates a code of variable length.A hash function may give the same hash value for distinct messages.(A) I only(B) II and III only(C) I and III only(D) II only

Answer» Answer: (C)
Explanation:

Hash function is defined as any function that can be used to map data of arbitrary size of data to a fixed size data.. The values returned by a hash function are called hash values, hash codes, digests, or simply hashes : Statement 1 is correct
Yes, it is possible that a Hash Function maps a value to a same location in the memory that’s why collision occurs and we have different technique to handle this problem : Statement 3 is correct.
eg : we have hash function, h(x) = x mod 3

Acc to Statement 1, no matter what the value of ‘x’ is h(x) results in a fixed mapping location.
Acc. to Statement 3, h(x) can result in same mapping mapping location for different value of ‘x’ e.g. if x = 4 or x = 7 , h(x) = 1 in both the cases, although collision occurs.

3.

A cache line is 64 bytes. The main memory has latency 32ns and bandwidth 1G.Bytes/s. The time required to fetch the entire cache line from the main memory is(A) 32 ns(B) 64 ns(C) 96 ns(D) 128 ns

Answer»
4.

Suppose that we have numbers between 1 and 100 in a binary search tree and want to search for the number 55. Which of the following sequences CANNOT be the sequence of nodes examined?(A) {10, 75, 64, 43, 60, 57, 55}(B) {90, 12, 68, 34, 62, 45, 55}(C) {9, 85, 47, 68, 43, 57, 55}(D) {79, 14, 72, 56, 16, 53, 55}

Answer»
5.

Match the following concepts and their best possible descriptions.<br>(A) i-b, ii-d, iii-e, iv-f, v-g, vi-a(B) i-c, ii-a, iii-e, iv-d, v-h, vi-f(C) i-c, ii-f, iii-h, iv-a, v-g, vi-d(D) i-b, ii-e, iii-c, iv-f, v-g, vi-s

Answer»
6.

Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R respectively. The relation r1 contains 2000 tuples and r2 contains 2500 tuples. The maximum size of the join r1⋈r2 is :(A) 2000(B) 2500(C) 4500(D) 5000

Answer»