GATE CS 2026 Set 1 — Question 24
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.MSQ+1 / -0MediumOpen AddressingHashingProgramming & Data Structures
Programming & Data Structures → Hashing → Open Addressing
Last updated
Question
Consider a hash table that is initially empty. The hash table is maintained using open addressing with linear probing. The hash function used is .Consider the following sequence of insertions performed on :Which of the following positions in the hash table is/are empty after these insertions are performed?
Correct answer
(C) 2
Solution
We insert the keys into the hash table of size 11 (indices 0 to 10) using and linear probing.
(A) 0 is occupied.
(B) 10 is occupied.
(C) 2 is empty.
(D) 1 is occupied.Only option (C) corresponds to an empty position.
1.Insert 1: . is empty. Place 1 at .
2.Insert 13: . is empty. Place 13 at .
3.Insert 22: . is empty. Place 22 at .
4.Insert 15: . is empty. Place 15 at .
5.Insert 11: . is occupied (22). Probe next:
- Index 8: Occupied (1).
- Index 9: Occupied (13).
- Index 10: Empty. Place 11 at .
- Index 10: Occupied (11).
- Index 0: Occupied (15).
- Index 1: Empty. Place 24 at .
- Occupied indices: .
- Empty indices: .
(A) 0 is occupied.
(B) 10 is occupied.
(C) 2 is empty.
(D) 1 is occupied.Only option (C) corresponds to an empty position.
Continue learning with Success Tracker
A step still unclear? Work through it with support
Use Success Tracker to ask about the reasoning, then try another GATE CS question to check your understanding.
AI-powered practice· Unlimited practice on eligible plans
- PYQs with solutions
- Attempt available previous-year questions, then compare your reasoning with the worked solution. Coverage varies by stream.
- Practice that adapts
- Choose a topic, work on weaker areas and bookmark questions to revisit. Your attempts feed your progress tracking.
- AI doubt support
- Ask follow-up questions about a step or concept while practising, instead of stopping at the final answer.
Unlimited practice is available on eligible plans. Free practice and AI usage have limits; check the current plan allowances before choosing.
This page stays readable without an account. AI responses can be wrong; check them against the solution and source material.
More questions on Hashing
2026 Set 2 Q12The set T represents various traversals over binary tree. The set S represents the order of…2026 Set 2 Q19Consider the following three ANSI-C programs, P1, P2, and P3. P1 [code] P2 [code] **P3**…2026 Set 1 Q23Let be an odd number greater than 100. Consider a binary minheap with elements stored in an…2026 Set 1 Q27Consider the following C statements: Which of the following options is/are correct? [figure]2026 Set 2 Q30The keys 5, 28, 19, 15, 26, 33, 12, 17, 10 are inserted into a hash table using the hash function…