Erase function doubt

I am only able to erase a key if rehashing is done. Can you please tell me how to erase any middle element or last element if rehashing is not done.

@avijuneja2007
Please have a look at this https://www.geeksforgeeks.org/linked-list-set-3-deleting-node/