0% found this document useful (0 votes)
543 views

Unit-1-Hashing Mcqs

1. The document describes a hash table of length 10 using open addressing with a hash function of h(k)=k mod 10 and linear probing. After inserting 6 values, the table is shown. 2. One question asks which insertion sequence could have resulted in the shown table, with the answer being C. 3. Another question asks how many different insertion sequences could result in the same table, with the answer being 30.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
543 views

Unit-1-Hashing Mcqs

1. The document describes a hash table of length 10 using open addressing with a hash function of h(k)=k mod 10 and linear probing. After inserting 6 values, the table is shown. 2. One question asks which insertion sequence could have resulted in the shown table, with the answer being C. 3. Another question asks how many different insertion sequences could result in the same table, with the answer being 30.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

((MARKS)) 


QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  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
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

is as shown below. Which one of the following choices


gives a possible order in which the key values could have been inserted in the
table? 
((OPTION_A))  46,42,34,52,23,33 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  34,42,23,52,33,46 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  46,34,42,23,52,33 
This is optional 

((OPTION_D))  42,46,33,23,34,52 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION The sequence (A) doesn’t create the hash table as the element 52 appears
before 23 in this sequence.
)) This is also 
The sequence (B) doesn’t create the hash table as the element 33 appears
optional  before 46 in this sequence.
The sequence (C) creates the hash table as 42, 23 and 34 appear before 52 and
33, and 46 appears before 33.
The sequence (D) doesn’t create the hash table as the element 33 appears
before 23 in this sequence.
 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  How many different insertion sequences of the key values using

ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

the same hash function h(k)=k mod 10 and linear probing will result in the hash
table shown above? 
((OPTION_A))  10 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  20 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  30 
This is optional 

((OPTION_D))  40 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 
((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION In a valid insertion sequence, the elements 42, 23 and 34 must appear before 52
and 33, and 46 must appear before 33.
)) This is also 
Total number of different sequences = 3! x 5 = 30
optional  In the above expression, 3! is for elements 42, 23 and 34 as they can appear in
any order, and 5 is for element 46 as it can appear at 5 different places 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  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
ENTER  linear probing. What is the resultant hash
CONTENT. QTN  table?
CAN HAVE 
IMAGES ALSO 

 
((OPTION_A))  A 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  B 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  C 
This is optional 

((OPTION_D))  D 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION Open addressing, or closed hashing, is a method of collision resolution in hash


tables. With this method a hash collision is resolved by probing, or searching
)) This is also  through alternate locations in the array (the probe sequence) until either the
optional  target record is found, or an unused array slot is found, which indicates that there
is no such key in the table. Well known probe sequences include: linear
probing in which the interval between probes is fixed--often at 1. quadratic
probing in which the interval between probes increases linearly (hence, the
indices are described by a quadratic function). double hashing in which the
interval between probes is fixed for each record but is computed by another hash
function. 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Consider a hash table of size seven, with starting index zero, and a hash function
(3x + 4)mod7. Assuming the hash table is initially empty, which of the following is
ENTER  the contents of the table when the sequence 1, 3, 8, 10 is inserted into the table
CONTENT. QTN  using closed hashing? Note that ‘_’ denotes an empty location in the table. 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  8, _, _, _, _, _, 10 

THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  1, 8, 10, _, _, _, 3 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  1, _, _, _, _, _,3 

This is optional 
1, 10, 8, _, _, _, 3 
((OPTION_D)) 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH B 
OICE)) Either A 
or B or C or D or 

let us put values 1, 3, 8, 10 in the hash of size 7. Initially, hash table is empty
((EXPLANATION
)) This is also      ­    ­    ­   ­   ­   ­   ­ 
optional      0    1   2   3   4   5   6 

The value of function (3x + 4)mod 7 for 1 is 0, so let us put the value at 0
    1    ­    ­   ­   ­   ­   ­ 
    0    1   2   3   4   5   6 

The value of function (3x + 4)mod 7 for 3 is 6, so let us put the value at 6
    1    ­    ­   ­   ­   ­   3 
    0    1   2   3   4   5   6 

The value of function (3x + 4)mod 7 for 8 is 0, but 0 is already occupied, let us
put the value(8) at next available space(1)
    1    8    ­   ­   ­   ­   3 
    0    1   2   3   4   5   6 

The value of function (3x + 4)mod 7 for 10 is 6, but 6 is already occupied, let us
put the value(10) at next available space(2)
    1    8   10   ­   ­   ­   3 
    0    1   2    3   4   5   6 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and
the hash function x mod 10, which of the following statements are true? i. 9679,
ENTER  1989, 4199 hash to the same value ii. 1471, 6171 has to the same value iii. All
CONTENT. QTN  elements hash to the same value iv. Each element hashes to a different value  
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  I only 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  Ii only  
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  I and ii only 
This is optional 

((OPTION_D))  Iii or iv 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION Hash function given is mod(10). 
)) This is also  9679, 1989 and 4199 all these give same hash value i.e 9 
optional 
1471 and 6171 give hash value 1 

 
((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Consider a hash table with 100 slots. Collisions are resolved using chaining.
Assuming simple uniform hashing, what is the probability that the first 3 slots are
ENTER  unfilled after the first 3 insertions? 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  (97 × 97 × 97)/1003 

THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  (99 × 98 × 97)/1003 

THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  (97 × 96 × 95)/1003 

This is optional 

((OPTION_D))  (97 × 96 × 95)/(3! × 1003) 

This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH A 
OICE)) Either A 
or B or C or D or 

Simple Uniform hashing function is a hypothetical hashing function that evenly
((EXPLANATION distributes items into the slots of a hash table. Moreover, each item to be hashed
)) This is also  has an equal probability of being placed into a slot, regardless of the other
optional  elements already placed.
Probability that the first 3 slots are unfilled after the first 3 
insertions =  
                (probability that first item doesn't go in any of the 
first 3 slots)* 
                (probability that second item doesn't go in any of the 
first 3 slots)* 
                (probability that third item doesn't go in any of the 
first 3 slots) 
 
                 = (97/100) * (97/100) * (97/100)  

 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Which one of the following hash functions on integers will distribute keys most
uniformly over 10 buckets numbered 0 to 9 for i ranging from 0 to 2020? 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  h(i) =i2 mod 10 

THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  h(i) =i3 mod 10 

THIS IS ALSO 
MANDATORY 
OPTION 
h(i) = (11 ∗ i2) mod 10 
((OPTION_C)) 
This is optional 

((OPTION_D))  h(i) = (12 ∗ i) mod 10 

This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 
((CORRECT_CH B 
OICE)) Either A 
or B or C or D or 

Since mod 10 is used, the last digit matters. If you do cube all numbers from 0 to
((EXPLANATION 9, you get following
)) This is also 
Number    Cube    Last Digit in Cube 
optional 
  0        0              0  

  1        1              1  
  2        8              8  
  3        27             7  
  4        64             4  
  5        125            5  
  6        216            6 

  7        343            3 
  8        512            2 
  9        729            9   

Therefore all numbers from 0 to 2020 are equally divided in 10 buckets. If we


make a table for square, we don't get equal distribution. In the following table. 1,
4, 6 and 9 are repeated, so these buckets would have more entries and buckets
2, 3, 7 and 8 would be empty.
Number   Square     Last Digit in Cube 
  0        0              0  
  1        1              1  
  2        4              4  
  3        9              9  
  4        16             6 
  5        25             5  
  6        36             6 
  7        49             9 
  8        64             4 
  9        81             1   

 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Given a hash table T with 25 slots that stores 2000 elements, the load factor α for
T is __________ 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  80 

THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  0.0125 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  8000 
This is optional 

((OPTION_D))  1.25 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH A 
OICE)) Either A 
or B or C or D or 

((EXPLANATION load factor = (no. of elements) / (no. of table slots) = 2000/25 = 80 
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 
Which of the following statement(s) is TRUE?
((QUESTION))  1. A hash function takes a message of arbitrary length and generates a
ENTER  fixed length code.
2. A hash function takes a message of fixed length and generates a code of
CONTENT. QTN  variable length.
3. A hash function may give the same hash value for distinct messages
CAN HAVE 
IMAGES ALSO   

((OPTION_A))  I only 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  Ii and iii only 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  I and iii only 
This is optional 

((OPTION_D))  Ii only 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION Hash function is defined as any function that can be used to map data of
)) This is also  arbitrary size of data to a fixed size data.. The values returned by a hash
optional  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 memmory that's why collision occurs and
we have different technique to handle this problem : Statement 3 is
coorect. 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. 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Consider a hash function that distributes keys uniformly. The hash table size is
20. After hashing of how many keys will the probability that any new key hashed
ENTER  collides with an existing one exceed 0.5. 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  5 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  6 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  7 
This is optional 

((OPTION_D))  10 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH D 
OICE)) Either A 
or B or C or D or 

((EXPLANATION For each entry probability of collision is 1/20 {as possible total spaces =20, and
an entry will go into only 1 place}
)) This is also 
Say after inserting x values probability becomes ½
optional   (1/20).x = ½
 X=10 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Process of finding some other position when hash address is occupied is
classified as 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  collision resolution 


THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  address space resolution 


THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  multiple hashing resolution 


This is optional 

((OPTION_D))  chaining resolution 


This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH A 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  We have a hash table of size 7 to store integer keys, with hash
function h(x) = x mod 7. If we use linear probing and insert elements in
ENTER  the order 1, 15, 14, 3, 9, 5, 27,in which bucket 9 will be placed?  
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  3 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  4 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  2 
This is optional 

((OPTION_D))  5 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH B 
OICE)) Either A 
or B or C or D or 

((EXPLANATION Index   key 
)) This is also  0 14 
optional 
1 1 
2 15 
3 3 
4 9 
5 5 
6 27 
Collision occurred for 9 at 2 index, so we tried to find next available 
bucket i.e. 4 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 
1. What causes a collision? 
((QUESTION)) 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  The program you are running crashes 
THIS IS 
MANDATORY 
OPTION 
There are too many hash keys in the array 
((OPTION_B)) 
THIS IS ALSO 
MANDATORY 
OPTION 
Two hash keys are the same  
((OPTION_C)) 
This is optional 

((OPTION_D))  The program is out of memory 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION Collision is a situation when two keys demand for same location .i.e their 
)) This is also  hash address is same  
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 
What are the three types of collision solutions? 
((QUESTION)) 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  Overflow, underflow and undertow  
THIS IS 
MANDATORY 
OPTION 
Chaining, rehashing and probing 
((OPTION_B)) 
THIS IS ALSO 
MANDATORY 
OPTION 
Probing, underflow and chaining 
((OPTION_C)) 
This is optional 

((OPTION_D))  None 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH B 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Hash function used to map several dictionary entry in hash table .Each 
position is  called as  
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  Bucket 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  Probe 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  Synonym 
This is optional 

((OPTION_D))  None 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH A 
OICE)) Either A 
or B or C or D or 

((EXPLANATION Hash table is partitioned into different buckets  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  If hash function is hash(x)=x mod 10 then 21,101,121,151 are ­­­­ of each 
other. 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  Load factor 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  Synonym 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  Both a and b 
This is optional 

((OPTION_D))  None 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH B 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Which of below is type of hash function 
ENTER  1.Division 
CONTENT. QTN  2.Bit extraction 
CAN HAVE  3.Folding 
IMAGES ALSO 
4. Linear probing 
5.Chaining 
6.Rehashing 
((OPTION_A))  1,2 and 3 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  All are correct 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  4,5 and 6 
This is optional 

((OPTION_D))  2,4 and 6 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 
((CORRECT_CH A 
OICE)) Either A 
or B or C or D or 

((EXPLANATION Only first 3 are hash functions and rest are collision resolution strategy  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  For key 345678123 what will be index in fold shift and fold boundry 
respectively  
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  146 and 542 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  641 and 245 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  542 and 146 
This is optional 

((OPTION_D))  678 and 876 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 
((CORRECT_CH A 
OICE)) Either A 
or B or C or D or 

((EXPLANATION In fold shift, 
)) This is also  345 678 123 
optional 
 
 345 
+678 
+123 
1146 discard 1 so  index =146 
In fold boundry, 
 
 543 
+678 
+321 
1542 discard 1 so index=542 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Which of the below is rules for choosing hash function? 
ENTER  1. easy to compute 
CONTENT. QTN  2. Less no of collision  
CAN HAVE  3. Should not depend on every bit of the key 
IMAGES ALSO 
4. It should produce keys which will get distributed un uniformly 
((OPTION_A))  1 and 2 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  All of the above 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  3 and 4 
This is optional 

((OPTION_D))  None of the above 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH A 
OICE)) Either A 
or B or C or D or 

((EXPLANATION It should depend on every bit of key and should distribute keys uniformly 
)) This is also  over the table so 3 and 4 are not correct 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Below is open hashing technique is collision resolution 
ENTER  1. Open addressing  
CONTENT. QTN  2. Chaining 
CAN HAVE  3. Rehashing 
IMAGES ALSO 
4. Double hashing 
((OPTION_A))  1 only 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  2 only 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  3 only 
This is optional 

((OPTION_D))  All of the above 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH B 
OICE)) Either A 
or B or C or D or 

((EXPLANATION In open hashing, collisions are stored outside the table And in closed 
)) This is also  hashing collisions are stored in same table at some other index 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  In quadratic probing with hash function hash(k)=k mod 10 , for keys 
37,90,55,22,11,17,49,87 placed in hash table of size 10 ,what will be 
ENTER 
location of 87?  
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  7 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  8 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  1 
This is optional 

((OPTION_D))  6 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH D 
OICE)) Either A 
or B or C or D or 

((EXPLANATION If collision situation , H(k)=(hash(k)+i2) mod m 
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  For keys : 37,90,45,22,17,49,55 placed in hash table of size 10, what will 
be location of 17?  
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  7 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  4 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  1 
This is optional 

((OPTION_D))  2 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION In double hash in case of collision h2(key)=M­(key mod M) whatever 2 nd 


)) This is also  hash index we generate, that many times need to move from home 
optional  address here for 17  h1(17)=7 and  h2(17)=4 i.e move 4 places from 7 so 
we get index 2 for storing 17  
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  When we are using rehashing technique? 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  When insertion fail due to overflow 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  When table is almost filled and to avoid future failure in insertion 
THIS IS ALSO  operation 
MANDATORY 
OPTION 

((OPTION_C))  Both A and B 
This is optional 

((OPTION_D))  Only A 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  For keys 50, 700, 76, 85, 92, 73, 101 stored in hash table with hash function
=key mod 7 and chaining is used for resolving collision. Which of the below is
ENTER  part of same list? 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  50,85 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  50,85,92 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  73,101 
This is optional 

((OPTION_D))  Both B and C 
This is optional 

((OPTION_E))  None of the above  
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH D 
OICE)) Either A 
or B or C or D or 

((EXPLANATION All synonyms are part of same link list in chaining 
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Dictionary consists of…… and is ­­­­­ 


ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  Pairs of <key,value>, of no specific order 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  Keys,sorted 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  Pairs of<key,value>, sorted 
This is optional 

((OPTION_D))  None of the above 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Suppose you are given the following set of keys to insert into a hash table
that holds exactly 11 values: 113 , 117 , 97 , 100 , 114 , 108 , 116 , 105 , 99
ENTER  Which of the following best demonstrates the contents of the has table after
CONTENT. QTN  all the keys have been inserted using linear probing? 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  100, __, __, 113, 114, 105, 116, 117, 97, 108, 99  

THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  99, 100, __, 113, 114, __, 116, 117, 105, 97, 108  

THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  100, 113, 117, 97, 14, 108, 116, 105, 99, __, __  

This is optional 

((OPTION_D))  117, 114, 108, 116, 105, 99, __, __, 97, 100, 113  

This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH B 
OICE)) Either A 
or B or C or D or 

((EXPLANATION Using modulo 11 arithmetic and linear probing gives these values  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  If total no of keys are 20 and hash table size is 40 then average no of 
comparisons  of successful search in separate chaining is  
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  1.25 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  0.5 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  0.25 
This is optional 

((OPTION_D))  2 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH A 
OICE)) Either A 
or B or C or D or 

((EXPLANATION Sn=1+(α/2) in chaining  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  What is average time complexity of searching in skip list? 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  O(n) 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  O(nlogn) 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  O(n/2) 
This is optional 

((OPTION_D))  O(log n) 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH D 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  What is true  in extensible hashing? 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  Hash function uses key directly  
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  Hash function takes Binary representation 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  Trie is mapped to directory 
This is optional 

((OPTION_D))  All of the above 
This is optional 

((OPTION_E))  Only B and C 
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH E 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  What happens in case of overflow in extensible hashing, 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  Buckets are splitted 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  No of entries of Directory doesn’t change  


THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  Directory is doubled  
This is optional 

((OPTION_D))  Both A and C 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH D 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Which of below technique have less no of collision? 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  Linear probing 
THIS IS 
MANDATORY 
OPTION 

((OPTION_B))  Quadratic probing 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  Chaining 
This is optional 

((OPTION_D))  Both A and B 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH B 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1 
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Pair below 
ENTER  1. Linear probing         a. H(key)=(Hash(key)+i)mod max) 
CONTENT. QTN  2. Quadratic probing   b. H(key)=(Hash(key)+i2)mod max) 
CAN HAVE   
IMAGES ALSO 
3. Double hashing          c. table is resized whose size is prime number 
4. Rehashing                 d.H2(key)=M­(key mod M) 
5. Chaining                    e. Few table indices may leave empty 
((OPTION_A))  1­a,2­b,3­c,4­d,5­e 
THIS IS 
MANDATORY 
OPTION 
((OPTION_B))  1­b,2­a,3­c,4­d,5­e 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  1­a,2­b,3­d,4­c,5­e 
This is optional 

((OPTION_D))  1­c,2­b,3­a,4­e,5­d 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Which of below is true? 
ENTER  1. Skip list are better than link list in searching 
CONTENT. QTN  2. Quadratic probing have less number of collision compared to 
CAN HAVE  linear probing 
IMAGES ALSO  3. Resizing is cheap operation 
((OPTION_A))  I only 
THIS IS 
MANDATORY 
OPTION 
((OPTION_B))  I and ii only 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  All of the above 
This is optional 

((OPTION_D))  Only i and iii 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH B 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Which of the below stores data in sorted order? 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  Hash table 
THIS IS 
MANDATORY 
OPTION 
((OPTION_B))  Dictionary 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  Skip list 
This is optional 

((OPTION_D))  Both B and C 
This is optional 

((OPTION_E))  All of the above 
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH D 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))  Time complexity of perfect hash function in worst case is 
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))  O(n) 
THIS IS 
MANDATORY 
OPTION 
((OPTION_B))  O(log n) 
THIS IS ALSO 
MANDATORY 
OPTION 

((OPTION_C))  O(1) 
This is optional 

((OPTION_D))  O(n/2) 
This is optional 

((OPTION_E))   
This is optional. 
If optional keep 
empty so that 
system will skip 
this option 

((CORRECT_CH C 
OICE)) Either A 
or B or C or D or 

((EXPLANATION  
)) This is also 
optional 
 

((MARKS))  1
QUESTION IS OF 
HOW MANY 
MARKS? (1 OR 2 
OR 3 UPTO 10) 

((QUESTION))   
ENTER 
CONTENT. QTN 
CAN HAVE 
IMAGES ALSO 

((OPTION_A))   
THIS IS 
MANDATORY 
OPTION 

You might also like