Which one of the following hash functions on integers will distribute keys…
GATE · 2015 · CS · Set 2 · Computer Science & IT
Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for 𝑖 ranging from 0 to 2020?
- A.
\(ℎ(𝑖) = 𝑖^2 \ mod \ 10\) - B.
\(ℎ(𝑖) = 𝑖^3 \ mod \ 10\) - C.
\(ℎ(𝑖) = (11 * 𝑖^2) \ mod \ 10\) - D.
\(ℎ(𝑖) = (12 * 𝑖) \ mod \ 10\)
Attempted by 574 students.
Show answer
Correct answer: B
The worked solution is available to enrolled students.
Video solution available to enrolled students.
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…