Which one of the following hash functions on integers will distribute keys…

PYQ GATE 2015

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?

  1. A.

    h(𝑖)=𝑖2 mod 10ℎ(𝑖) = 𝑖^2 \ mod \ 10

  2. B.

    h(𝑖)=𝑖3 mod 10ℎ(𝑖) = 𝑖^3 \ mod \ 10

  3. C.

    h(𝑖)=(11∗𝑖2) mod 10ℎ(𝑖) = (11 * 𝑖^2) \ mod \ 10

  4. D.

    h(𝑖)=(12∗𝑖) mod 10ℎ(𝑖) = (12 * 𝑖) \ mod \ 10

Attempted by 677 students.

Sign up free to check your answer

Sign up free

Explore the full course: Data Structures

Loading lesson…