Open Hashing Code
Dictionary & findBucket(const Key & k) {
return table[hash(k)%table.size];
}
void insert(const Key & k,
const Value & v)
{
findBucket(k).insert(k,v);
}
void delete(const Key & k)
{
findBucket(k).delete(k);
}
Value & find(const Key & k)
{
return findBucket(k).find(k);
}
Previous slide
Next slide
Back to first slide
View graphic version