GATE Assistant

Past questions › Data Science and Artificial Intelligence › GATE 2025

GATE 2025 · DA · MCQ · 1 mark · Programming, Data Structures and Algorithms › Trees & Hash Tables

GATE 2025 Data Science and Artificial Intelligence question: Consider a hash table of size 10 with indices \ 0, 1, , 9\ , with the hash function h(x)…

Consider a hash table of size 10 with indices , with the hash function

,

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

Show answer

Official answer: D

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion