help i need to search and delete a node from a link list
but i am not sure of the algorithm
can someone please help me with the algorithm and concept
need example thanks..

Recommended Answers

All 3 Replies

help i need to search and delete a node from a link list
but i am not sure of the algorithm
can someone please help me with the algorithm and concept
need example thanks..

Draw a picture of a linked list on paper. Then write down the steps
you feel is needed to find an element. The same for deleting an element.

commented: Nice +19

a search needs a for loop which keeps on moving the pointer forward and if it find it returns true.

similar thing for a general delete I would think. You would have to traverse entire list.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.