The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
33 views
Consider a hashing function that resolves collision by quadratic probing.Assume  the address space is indexed from 1 to 8.Which of the following location will never be probed if a collison occurs at a position 4?

a) 4                                       b)5

c)8                                        d)2
asked in DS by (153 points) | 33 views
0
0
Yes 5 should be the answer, to avoid primary clustering (to create a run of filled slots after the correct position) in case of linear probing we moved on quadratic probing (which still suffers from Secondary clustering)
0
This and link question is different.

I hope you saw that?
0

I have a question

In quadratic probing(or any open addressing) if there is collision we move to some other index if we still have collision we will go to some other index likewise we have to go through all the indices before saying that we don't have space to insert a new index.

So my point is we have to probe through all the indices in the worst says.

Here in this question if "Which of the following location will never be probed if a collision occurs at a position 4" 

is replaced with "Which of the following location will never be probed immediate next if a collision occurs at a position 4" would give the answer as 5.

Please log in or register to answer this question.

Related questions

0 votes
0 answers
2
asked 6 days ago in DS by Gate Fever Active (2.2k points) | 27 views
0 votes
0 answers
5
asked Oct 19 in DS by garimanand Active (1.1k points) | 42 views


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

42,557 questions
48,550 answers
155,296 comments
63,510 users