Questions about linear probing, the technique for resolving collisions in hash tables.
Questions tagged [linear-probing]
52 questions
0
votes
1 answer
Linear collision for closed hash table run out of space
So I have an 8-bucket hash table with h(i) = i mod 8
These are the numbers being inserted:
7, 11, 18, 28, 20, 8, 15, 23
I just started learning hash table so I'm pretty confused about these concepts.
If I have an open hash table, the result would…

PTN
- 1,658
- 5
- 24
- 54
0
votes
1 answer
resizing tradeoffs when implementing Hashtable using linear probing
I am trying to implement a hashtable using linear probing.
Before inserting a (key, value) pair into the hashtable, I want to check if it's half full. If it is, I need to double the size of the underlying array.
Obviously, there are two ways to…

deadmouse
- 1
- 3
0
votes
0 answers
Python Hashtable linear probing
I am trying to find which index in a given list would give the largest number of probes needed before that index is assigned in a hashtable. I have a list which looks something like this:
[4, 9, 12, 3, 7, 26, 16, 20, 11]
and i need to figure out…

Kryptic12
- 3
- 2
0
votes
1 answer
Double Hashing vs Linear Hashing
I'm writing double hash table which only takes integer.
unsigned int DoubleHashTable::HashFunction1(unsigned int const data)
{
return (data % GetTableSize());
}
unsigned int DoubleHashTable::HashFunction2(unsigned int const data, unsigned int…

user58569
- 47
- 1
- 5
0
votes
2 answers
Hash Table Linear Probing
I'm making a hash table with one String array single dimension and a 2 dimensional int array. I'm using linear probing for my collision detection and was really steaming through this program when I realized if a collision is detected the word's…
user4027720
0
votes
2 answers
Linear Probing on Java HashTable implementation
So I have a HashTable implementation here that I wrote using only Arrays and had a little bit of help with the code. Unfortunately, I don't quite understand one of the lines someone added while running the "get" or "put" method. What exactly is…

user1493543
- 375
- 3
- 5
- 14