Destructor (recursive deletion) in hashtable

sir I do not understand how will the destructor work recursively?

Destructor function should be called like this

~Node(){
        while(next!=NULL){
            delete next ; //recursively calling all the other next elements and deleting them in a linked list
        }
    }

Now you will get how it will delete all elements in a linked list.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.