Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | GATE CS 1997 | Question 56

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

What is the probability of a collision when hashing n keys into a hash table of size m, assuming that the hash function produces a uniform random distribution?

(A)

O(1/n)

(B)

O(n/m)

(C)

O(logn)

(D)

O(m/n)



Answer: (B)

Explanation:

The probability of a collision occurring is dependent on the number of items hashed (n) and the size of the hash table (m). As the number of items increases, the probability of a collision also increases. However, as the size of the hash table increases, the probability decreases. Therefore, the probability of a collision can be estimated as O(n/m).


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Last Updated : 20 May, 2019
Like Article
Save Article
Similar Reads