Question 31
Question 34
Question 35
An advantage of chained hash table (external hashing) over the open addressing scheme is
Question 36
Given a hash table T with 25 slots that stores 2000 elements, the load factor α for T is __________
Question 37
Question 38
The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k) = k mod 10 and linear probing. What is the resultant hash table?
[caption width="800"] [/caption]Question 39
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below.
[caption width="800"] [/caption]Which one of the following choices gives a possible order in which the key values could have been inserted in the table?
Question 40
An array A consists of n integers in locations A[0], A[1] ....A[n-1]. It is required to shift the elements of the array cyclically to the left by k places, where 1 <= k <= (n-1). An incomplete algorithm for doing this in linear time, without using another array is given below. Complete the algorithm by filling in the blanks. Assume alt the variables are suitably declared.
min = n; i = 0;
while (___________) {
temp = A[i]; j = i;
while (________) {
A[j] = ________
j= (j + k) mod n ;
If ( j< min ) then
min = j;
}
A[(n + i — k) mod n] = _________
i = __________
There are 50 questions to complete.