In delete_node(), if we delete the head node, and the only remaining nodes in the list is indeed this head node, then statement "head = head->next;" will corrupt the list... I have used your implementation in my program and have faced this issue. What do you think?
Thanks a lot M-ric for pointing out the difficulty in captcha. I have removed the captcha from comment and have also included anonymous comments. I will also work on delete node and try to solve it.
To write comment, the catpcha stuff is terrible. I almost typed 10 times the character chain on the screen to get it write. It is so damn annoying. Probably one of the reason why there are so few comments on this otherwise very instructive blog.
In delete_node(), if we delete the head node, and the only remaining nodes in the list is indeed this head node, then statement "head = head->next;" will corrupt the list... I have used your implementation in my program and have faced this issue.
ReplyDeleteWhat do you think?
Thanks, and keep on the good work!
Thanks a lot M-ric for pointing out the difficulty in captcha. I have removed the captcha from comment and have also included anonymous comments.
DeleteI will also work on delete node and try to solve it.
To write comment, the catpcha stuff is terrible. I almost typed 10 times the character chain on the screen to get it write. It is so damn annoying. Probably one of the reason why there are so few comments on this otherwise very instructive blog.
ReplyDeleteCan you remove it?