GATE DA 2025 · Question 18 · Programming, Data Structures and Algorithms · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

Consider a hash table of size 10 with indices {0, 1, …, 9}, with the hash function
h(x) = 3x (mod 10),
where linear probing is used to handle collisions. The hash table is initially empty and then the following sequence of keys is inserted into the hash table: 1, 4, 5, 6, 14, 15. The indices where the keys 14 and 15 are stored are, respectively

  1. (A) 2 and 5
  2. (B) 2 and 6
  3. (C) 4 and 5
  4. (D) 4 and 6
Answer

Answer (D)

Answer from the official GATE DA 2025 answer key.

The step-by-step solution, where available, is part of GATE DA Pro. See what Pro includes