Saturday, October 27, 2007

Hashing Interview Question Part 2


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

1 comments:

Tochandresh Technologies on August 15, 2009 at 1:56 PM said...

As a part of ongoing campaigns to increase the Link Popularity of our web sites. As you know back links helps to achieve high search engine rankings & generating more traffic to our Sites as well

Advertisement

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com