GATE CS 2022 (Forenoon) — Question 16

AlgorithmsSearching, Sorting, Hashing MechanismsMCQ1 mark · −1/3 if wrongMedium

Suppose we are given \(n\) keys, \(m\) hash table slots, and two simple uniform hash functions \(h_1\) and \(h_2\). Further suppose our hashing scheme uses \(h_1\) for the odd keys and \(h_2\) for the even keys. What is the expected number of keys in a slot?
  1. A
    \(\frac{m}{n}\)
  2. B
    \(\frac{n}{m}\)
  3. C
    \(\frac{2n}{m}\)
  4. D
    \(\frac{n}{2m}\)
Practise the full 2022-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Algorithms (CLRS)The standard reference behind most GATE algorithm questions.
Practise more on Searching, Sorting, Hashing MechanismsTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group