The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
40 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 (267 points) | 40 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

–1 vote
0 answers
2
asked Jan 10 in DS by Nandkishor3939 Junior (791 points) | 44 views
0 votes
1 answer
7
asked Dec 31, 2018 in DS by Vignaneswarkrishna (17 points) | 57 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

47,109 questions
51,358 answers
177,866 comments
66,688 users