Hashing hashtable

how the destructor working here??

see we are passing the node that is oldTable[i] to the delete function
so the destructor destroys the node at that position
it deallocates the memory that was previously allocated

no mam i am talking about the destructor in the node class sir said it it recursively deleting how does recursive delete happen in destructor??

yr vo mere hisab se iterative hoga
cause vo for loop meh execute hoga

mam not in this video see the video 4 of hashing in which implimentation started from 3:10 to 4:15 and please clear it mam…

tell me the title of the 4th hashing video or the function where the destructor is being used
i have access to the 2HR LIVE video

tile is-“hashtable 04- class implimentation”…

through the first answer i understand that the first node which if not null calls the next member of the node on being called it calls the corresponding destructor and this process repeated untill next in not NULL or nullptr
so this is the concept of recursive deletion

so first calling is done and when function is coming back then the node is deleting??

mtlb?
i cant get what u mean to say

Mtlb jaise recursive function m postorder type hta h pehle we call next then do work while coming from function call … The destructor do the same way??

You have a list of objects all with a next pointer pointing to the next object. When you call delete on the first object, its destructor calls delete on its next object which calls delete on its next object etc… until there is no next object because the pointer is nullptr

last node gets deleted first then peche walle destruct hote h

1 Like

Yess that is what I am saying thanks mam…

1 Like

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.