Delete a linked list (all nodes)

preview_player
Показать описание
Delete all nodes in a linked list. Free() function is used to deallocate the memory.
Рекомендации по теме
Комментарии
Автор

Thank you for these videos on fundamental algorithms.

vincentluong
Автор

Thanks alot, was looking for this question everywhere finally satisfied.

yashpratapsingh
Автор

Great work! Very well explained and easy to follow.

pjdgaming
Автор

This video is gold Thank you very much!

jonathantea
Автор

please can you explain how delete a double linked list in form of tree

xVirus
Автор

Can you please post a short video on Number of Islands problem? Its the most frequent question asked in the interviews.

madhuradusumalli
Автор

Sir please help me. Will the free function work in c++

shyamsundard
Автор

the code is incorrect because delete function will take pointer to pointer of head
void delete(node **head)

mdabidiqbal
Автор

Sir I have a doubt plz clear it:
When u freed the p pointer then how can u assign store to p?
Plz explain it anyone

YashDEVELOPER
Автор

Also, can you please start the videos on Graphs? Thank you!

madhuradusumalli
Автор

Sorry man... Your concept is wrong.. You made free(p) and in the next line you are storing p = store. You might get no error but this concept is wrong. When you made p free, you can't assign p = store. The memory is not in your domain..

souravbiswas