can some one help me to develop the code for the following methods
private void add(Bucket bucket)
{ // is the bucket in the table?
// can it be added to the table?
// can the bucket be added at its hashed index?
// what is to be done if the hashed index bucket != null?
// can the bucket be added at a rehashed wrap-around index?
// what is to be done if the rehashed index bucket != null?
// are other keys required to be moved by the insertion sort addition?
// when adding the bucket, what private members are to be updated?
}
public void remove(int key)
{ // is the key valid?
// is the key in a bucket in the table?
// is the key at its hashed index?
// is the key at a rehashed index?
// are other keys required to be moved by the insertion sort removal?
// when removing the key’s bucket, what private members are to be updated?
}
is the below code correct
private void Add(Bucket bucket)
Add(right);
foreach (Node n in bucket.Nodes)
Add(n);
Add(n, false);
if (bucket.Replacement != null)
Add(bucket.Replacement);
Add(bucket.Replacement, false);
return true;
}