GATE CS 2015 · Set-2 · SQL Queries

MCQ · 2 marks · Problem DBMS-SQL-0296

Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for i ranging from 0 to 2020?
  1. A
    h(i)= \(i^{2}\) mod 10
  2. B
    h(i)= \(i^{3}\) mod 10
  3. C
    h(i)=(11*\(i^{2}\)) mod 10
  4. D
    h(i)=(12*\(i^{2}\)) mod 10

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/8152/gate2015-2-40

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com