jump to navigation

Hashing Interview Question Part 2 October 27, 2007

Posted by ctsasikumar in Uncategorized.
trackback

11. A hash table that grows to handle more items is called
a.optimal hashing
b.dynamic hashing
c.minimal perfect hashing
d.none
Ans:b
12. The associated hash function must change as the table grows in dynamic hashing.(T/F)
Ans:True
13. A hash table in which the hash function is the last few bits of the key and the table refers to buckets is called
a.optimal hashing
b.dynamic hashing
c.minimal perfect hashing
d.Extendible hashing
Ans:d
14. A dynamic hashing table that grows one slot at a time is called
a.linear hashing
b.dynamic hashing
c.minimal perfect hashing
d.Extendible hashing
Ans:a
15.Linear hashing is also known as
a.Decremental hashing
b.Incremental hashing
c.Extendible hashing
d.none
Ans:b
16. A dictionary implemented with two hash tables of equal size, T1 and T2, and two different hash functions, h1 and h2.
a.optimal hashing
b.dynamic hashing
c.minimal perfect hashing
d.2-left hashing
Ans:d
17. A variant of a hash table in which keys are added by hashing with two hash functions is called
a.optimal hashing
b.2-choice hashing
c.minimal perfect hashing
d.2-left hashing
Ans:b
18. The average-case cost of a successful search is__________ for 2-choice hashing where m is the number of keys and n is the size of the array
a. O(2 + (m-1)/n)
b.O(1+(m-1)/n)
c.O(3+(m-1)/n)
d.none
Ans:a
19. A conceptual method of open addressing for a hash table is called
a.Universal hashing
b.Uniform hashing
c.Optimal hashing
d.none
Ans:b
20. The assumption or goal that items are equally likely to hash to any value is called
a.Simple uniform hashing
b.Uniform hashing
c.Optimal hashing
d.none
Ans:a
21. A method of open addressing for a hash table in which a collision is resolved by searching the table for an empty place at intervals given by a different hash function, thus minimizing clustering is called
a.double hashing
b.Uniform hashing
c.Optimal hashing
d.none
Ans:a
22.Double hashing is also known as rehashing(T/F)
Ans:True
23. A scheme that chooses randomly from a set of hash functions is called
a.double hashing
b.Uniform hashing
c.Optimal hashing
d.universal hashing
Ans:d

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: