void erase(string key){
int idx=hashfn(key);
node * temp=table[idx];
node * prev=NULL;
while(temp!=NULL){
if(temp->key==key){
delete temp;
return;
}
prev=temp;
temp=temp->next;
}
}
after using this erase fn and then printing its giving output till that bucket at which bucket i am erasing something
whats the prblm in this fn