The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
45 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 (331 points) | 45 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
6
asked Jan 10 in DS by Nandkishor3939 Active (1.2k points) | 51 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
50,132 questions
53,252 answers
184,792 comments
70,509 users