in DS edited by
513 views
1 vote
1 vote

Suppose we used a hash function H(n) to hash ‘n’ distinct elements (keys) into an array T of length ‘m’. What is the expected number of colliding pairs of elements, if we used simple uniform hashing?

in DS edited by
513 views

1 comment

0
0

1 Answer

1 vote
1 vote
Best answer
There are nC2 pairs that may collide with probability each=1/m

i.e. (n2-n)/2m which is theta option C.
selected by