asked 83.4k views
2 votes
Load factor of a hash table is given by the following term?

(a) ratio N=n/λ
(b) ratio n=λ*N
(c) ratio λ=n/N
(d) ratio λ=N/n
(e) none of the above

1 Answer

5 votes

Final answer:

The load factor of a hash table is the ratio of the number of entries to the number of buckets, correctly represented by λ = n / N.

Step-by-step explanation:

The load factor (λ) of a hash table is a measure that gives us an indication of how full the hash table is. It's defined as the ratio of the number of entries (n) in the hash table to the number of buckets (slots) (N) that are available. The correct formula for the load factor is λ = n / N. This tells us, on average, how many entries are in each bucket. It's important to maintain a good balance because a low load factor could mean too much space being used, while a high load factor could lead to many collisions, which would decrease performance.

answered
User Jiayi Hu
by
8.2k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.