DEV Community

Mukilan Palanichamy
Mukilan Palanichamy

Posted on

My journey in competitive programming

A Productive Day: Deleting a Node and Removing an Element

Hello everyone,

Today, I narrowed my focus to two topics: Delete Node and Remove Element. These were tasks that I had been putting off for a while because they seemed a bit challenging to understand theory. Well, I finally decided to take them on, and I am glad I did!

At first, both seem quite similar because of their pronunciation but once I had to go through them, I noticed that they are totally different about the approach and the implementation.

Delete Node: This is based on deletion of a particular node in a linked list using an appropriate value. The part of interest is to see how pointers should be adjusted for the removal of a linked list not to be damaged from deletion.

Image description

Remove Element: It is a function that is going to remove all occurrences of any given value in the linked list. It has to traverse over the list and update links according for every match.

Image description

Top comments (0)